/*
 * Copyright (C) 2016 Allwinnertech, superm <superm@allwinnertech.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * PLL factor table
 */

#include "clk-sun8iw17.h"
/*
 * freq table from hardware, need follow rules
 * 1)   each table  named as
 *      factor_pll1_tbl
 *      factor_pll2_tbl
 *      ...
 * 2) for each table line
 *      a) follow the format PLLx(n, k, m, p, d1, d2, freq), and keep the
 *         factors order
 *      b) if any factor not used, skip it
 *      c) the factor is the value to write registers, not means factor + 1
 *
 *      example
 *      PLL1(9, 0, 0, 2, 60000000) means PLL1(n, k, m, p, freq)
 *      PLLVIDEO0(3, 0, 96000000) means PLLVIDEO0(n, m, freq)
 *
 */


/* PLLCPU0(n,k,m,p,freq)    F_N8X5_K4X2_M0X2_P16x2 */
struct sunxi_clk_factor_freq factor_pllcpu0_tbl[] = {
PLLCPU0(0,    1,    5,    2,    72000000),
PLLCPU0(0,    1,    6,    2,    84000000),
PLLCPU0(0,    1,    7,    2,    96000000),
PLLCPU0(0,    1,    8,    2,    108000000),
PLLCPU0(0,    1,    4,    1,    120000000),
PLLCPU0(0,    1,    10,    2,    132000000),
PLLCPU0(0,    1,    5,    1,    144000000),
PLLCPU0(0,    1,    12,    2,    156000000),
PLLCPU0(0,    1,    13,    2,    168000000),
PLLCPU0(0,    1,    14,    2,    180000000),
PLLCPU0(0,    1,    16,    2,    204000000),
PLLCPU0(0,    1,    8,    1,    216000000),
PLLCPU0(0,    1,    18,    2,    228000000),
PLLCPU0(0,    1,    4,    0,    240000000),
PLLCPU0(0,    1,    20,    2,    252000000),
PLLCPU0(0,    1,    10,    1,    264000000),
PLLCPU0(0,    1,    22,    2,    276000000),
PLLCPU0(0,    1,    11,    1,    288000000),
PLLCPU0(0,    1,    24,    2,    300000000),
PLLCPU0(0,    1,    12,    1,    312000000),
PLLCPU0(0,    1,    26,    2,    324000000),
PLLCPU0(0,    1,    13,    1,    336000000),
PLLCPU0(0,    1,    28,    2,    348000000),
PLLCPU0(0,    1,    14,    1,    360000000),
PLLCPU0(0,    1,    30,    2,    372000000),
PLLCPU0(0,    1,    15,    1,    384000000),
PLLCPU0(0,    1,    16,    1,    408000000),
PLLCPU0(0,    1,    17,    1,    432000000),
PLLCPU0(0,    1,    18,    1,    456000000),
PLLCPU0(0,    1,    19,    1,    480000000),
PLLCPU0(0,    1,    20,    1,    504000000),
PLLCPU0(0,    1,    10,    0,    528000000),
PLLCPU0(0,    1,    22,    1,    552000000),
PLLCPU0(0,    1,    11,    0,    576000000),
PLLCPU0(0,    1,    24,    1,    600000000),
PLLCPU0(0,    1,    12,    0,    624000000),
PLLCPU0(0,    1,    26,    1,    648000000),
PLLCPU0(0,    1,    13,    0,    672000000),
PLLCPU0(0,    1,    28,    1,    696000000),
PLLCPU0(0,    1,    14,    0,    720000000),
PLLCPU0(0,    1,    30,    1,    744000000),
PLLCPU0(0,    1,    15,    0,    768000000),
PLLCPU0(0,    1,    16,    0,    816000000),
PLLCPU0(0,    1,    17,    0,    864000000),
PLLCPU0(0,    1,    18,    0,    912000000),
PLLCPU0(0,    1,    19,    0,    960000000),
PLLCPU0(0,    1,    20,    0,    1008000000),
PLLCPU0(0,    1,    21,    0,    1056000000),
PLLCPU0(0,    1,    22,    0,    1104000000),
PLLCPU0(0,    1,    23,    0,    1152000000),
PLLCPU0(0,    1,    24,    0,    1200000000),
PLLCPU0(0,    1,    25,    0,    1248000000),
PLLCPU0(0,    1,    26,    0,    1296000000),
PLLCPU0(0,    1,    27,    0,    1344000000),
PLLCPU0(0,    1,    28,    0,    1392000000),
PLLCPU0(0,    1,    29,    0,    1440000000),
PLLCPU0(0,    1,    30,    0,    1488000000),
PLLCPU0(0,    1,    31,    0,    1536000000),
};

/* PLLCPU1(n,k,m,p,freq)	F_N8X5_K4X2_M0X2_P16x2 */
struct sunxi_clk_factor_freq factor_pllcpu1_tbl[] = {
PLLCPU1(0,    1,    5,    2,    72000000),
PLLCPU1(0,    1,    6,    2,    84000000),
PLLCPU1(0,    1,    7,    2,    96000000),
PLLCPU1(0,    1,    8,    2,    108000000),
PLLCPU1(0,    1,    4,    1,    120000000),
PLLCPU1(0,    1,    10,    2,    132000000),
PLLCPU1(0,    1,    5,    1,    144000000),
PLLCPU1(0,    1,    12,    2,    156000000),
PLLCPU1(0,    1,    13,    2,    168000000),
PLLCPU1(0,    1,    14,    2,    180000000),
PLLCPU1(0,    1,    16,    2,    204000000),
PLLCPU1(0,    1,    8,    1,    216000000),
PLLCPU1(0,    1,    18,    2,    228000000),
PLLCPU1(0,    1,    4,    0,    240000000),
PLLCPU1(0,    1,    20,    2,    252000000),
PLLCPU1(0,    1,    10,    1,    264000000),
PLLCPU1(0,    1,    22,    2,    276000000),
PLLCPU1(0,    1,    11,    1,    288000000),
PLLCPU1(0,    1,    24,    2,    300000000),
PLLCPU1(0,    1,    12,    1,    312000000),
PLLCPU1(0,    1,    26,    2,    324000000),
PLLCPU1(0,    1,    13,    1,    336000000),
PLLCPU1(0,    1,    28,    2,    348000000),
PLLCPU1(0,    1,    14,    1,    360000000),
PLLCPU1(0,    1,    30,    2,    372000000),
PLLCPU1(0,    1,    15,    1,    384000000),
PLLCPU1(0,    1,    16,    1,    408000000),
PLLCPU1(0,    1,    17,    1,    432000000),
PLLCPU1(0,    1,    18,    1,    456000000),
PLLCPU1(0,    1,    19,    1,    480000000),
PLLCPU1(0,    1,    20,    1,    504000000),
PLLCPU1(0,    1,    10,    0,    528000000),
PLLCPU1(0,    1,    22,    1,    552000000),
PLLCPU1(0,    1,    11,    0,    576000000),
PLLCPU1(0,    1,    24,    1,    600000000),
PLLCPU1(0,    1,    12,    0,    624000000),
PLLCPU1(0,    1,    26,    1,    648000000),
PLLCPU1(0,    1,    13,    0,    672000000),
PLLCPU1(0,    1,    28,    1,    696000000),
PLLCPU1(0,    1,    14,    0,    720000000),
PLLCPU1(0,    1,    30,    1,    744000000),
PLLCPU1(0,    1,    15,    0,    768000000),
PLLCPU1(0,    1,    16,    0,    816000000),
PLLCPU1(0,    1,    17,    0,    864000000),
PLLCPU1(0,    1,    18,    0,    912000000),
PLLCPU1(0,    1,    19,    0,    960000000),
PLLCPU1(0,    1,    20,    0,    1008000000),
PLLCPU1(0,    1,    21,    0,    1056000000),
PLLCPU1(0,    1,    22,    0,    1104000000),
PLLCPU1(0,    1,    23,    0,    1152000000),
PLLCPU1(0,    1,    24,    0,    1200000000),
PLLCPU1(0,    1,    25,    0,    1248000000),
PLLCPU1(0,    1,    26,    0,    1296000000),
PLLCPU1(0,    1,    27,    0,    1344000000),
PLLCPU1(0,    1,    28,    0,    1392000000),
PLLCPU1(0,    1,    29,    0,    1440000000),
PLLCPU1(0,    1,    30,    0,    1488000000),
PLLCPU1(0,    1,    31,    0,    1536000000),
};

/* PLLDDR0(n,m,freq)    F_N8X7_M0X2 */
struct sunxi_clk_factor_freq factor_pllddr0_tbl[] = {
PLLDDR0(0,    0,    24000000),
PLLDDR0(2,    0,    72000000),
PLLDDR0(3,    0,    96000000),
PLLDDR0(16,    3,    102000000),
PLLDDR0(12,    2,    104000000),
PLLDDR0(17,    3,    108000000),
PLLDDR0(13,    2,    112000000),
PLLDDR0(18,    3,    114000000),
PLLDDR0(4,    0,    120000000),
PLLDDR0(20,    3,    126000000),
PLLDDR0(15,    2,    128000000),
PLLDDR0(10,    1,    132000000),
PLLDDR0(16,    2,    136000000),
PLLDDR0(22,    3,    138000000),
PLLDDR0(5,    0,    144000000),
PLLDDR0(24,    3,    150000000),
PLLDDR0(18,    2,    152000000),
PLLDDR0(12,    1,    156000000),
PLLDDR0(19,    2,    160000000),
PLLDDR0(26,    3,    162000000),
PLLDDR0(6,    0,    168000000),
PLLDDR0(28,    3,    174000000),
PLLDDR0(21,    2,    176000000),
PLLDDR0(14,    1,    180000000),
PLLDDR0(22,    2,    184000000),
PLLDDR0(30,    3,    186000000),
PLLDDR0(7,    0,    192000000),
PLLDDR0(32,    3,    198000000),
PLLDDR0(24,    2,    200000000),
PLLDDR0(16,    1,    204000000),
PLLDDR0(25,    2,    208000000),
PLLDDR0(34,    3,    210000000),
PLLDDR0(8,    0,    216000000),
PLLDDR0(36,    3,    222000000),
PLLDDR0(27,    2,    224000000),
PLLDDR0(18,    1,    228000000),
PLLDDR0(28,    2,    232000000),
PLLDDR0(38,    3,    234000000),
PLLDDR0(9,    0,    240000000),
PLLDDR0(40,    3,    246000000),
PLLDDR0(30,    2,    248000000),
PLLDDR0(20,    1,    252000000),
PLLDDR0(31,    2,    256000000),
PLLDDR0(42,    3,    258000000),
PLLDDR0(10,    0,    264000000),
PLLDDR0(44,    3,    270000000),
PLLDDR0(33,    2,    272000000),
PLLDDR0(22,    1,    276000000),
PLLDDR0(34,    2,    280000000),
PLLDDR0(46,    3,    282000000),
PLLDDR0(11,    0,    288000000),
PLLDDR0(48,    3,    294000000),
PLLDDR0(36,    2,    296000000),
PLLDDR0(24,    1,    300000000),
PLLDDR0(37,    2,    304000000),
PLLDDR0(50,    3,    306000000),
PLLDDR0(12,    0,    312000000),
PLLDDR0(52,    3,    318000000),
PLLDDR0(39,    2,    320000000),
PLLDDR0(26,    1,    324000000),
PLLDDR0(40,    2,    328000000),
PLLDDR0(54,    3,    330000000),
PLLDDR0(13,    0,    336000000),
PLLDDR0(56,    3,    342000000),
PLLDDR0(42,    2,    344000000),
PLLDDR0(28,    1,    348000000),
PLLDDR0(43,    2,    352000000),
PLLDDR0(58,    3,    354000000),
PLLDDR0(14,    0,    360000000),
PLLDDR0(60,    3,    366000000),
PLLDDR0(45,    2,    368000000),
PLLDDR0(30,    1,    372000000),
PLLDDR0(46,    2,    376000000),
PLLDDR0(62,    3,    378000000),
PLLDDR0(15,    0,    384000000),
PLLDDR0(64,    3,    390000000),
PLLDDR0(48,    2,    392000000),
PLLDDR0(32,    1,    396000000),
PLLDDR0(49,    2,    400000000),
PLLDDR0(66,    3,    402000000),
PLLDDR0(16,    0,    408000000),
PLLDDR0(68,    3,    414000000),
PLLDDR0(51,    2,    416000000),
PLLDDR0(34,    1,    420000000),
PLLDDR0(52,    2,    424000000),
PLLDDR0(70,    3,    426000000),
PLLDDR0(17,    0,    432000000),
PLLDDR0(72,    3,    438000000),
PLLDDR0(54,    2,    440000000),
PLLDDR0(36,    1,    444000000),
PLLDDR0(55,    2,    448000000),
PLLDDR0(74,    3,    450000000),
PLLDDR0(18,    0,    456000000),
PLLDDR0(76,    3,    462000000),
PLLDDR0(57,    2,    464000000),
PLLDDR0(38,    1,    468000000),
PLLDDR0(58,    2,    472000000),
PLLDDR0(78,    3,    474000000),
PLLDDR0(19,    0,    480000000),
PLLDDR0(80,    3,    486000000),
PLLDDR0(60,    2,    488000000),
PLLDDR0(40,    1,    492000000),
PLLDDR0(61,    2,    496000000),
PLLDDR0(82,    3,    498000000),
PLLDDR0(20,    0,    504000000),
PLLDDR0(84,    3,    510000000),
PLLDDR0(63,    2,    512000000),
PLLDDR0(42,    1,    516000000),
PLLDDR0(64,    2,    520000000),
PLLDDR0(86,    3,    522000000),
PLLDDR0(21,    0,    528000000),
PLLDDR0(88,    3,    534000000),
PLLDDR0(66,    2,    536000000),
PLLDDR0(44,    1,    540000000),
PLLDDR0(67,    2,    544000000),
PLLDDR0(90,    3,    546000000),
PLLDDR0(22,    0,    552000000),
PLLDDR0(92,    3,    558000000),
PLLDDR0(69,    2,    560000000),
PLLDDR0(46,    1,    564000000),
PLLDDR0(70,    2,    568000000),
PLLDDR0(94,    3,    570000000),
PLLDDR0(23,    0,    576000000),
PLLDDR0(96,    3,    582000000),
PLLDDR0(72,    2,    584000000),
PLLDDR0(48,    1,    588000000),
PLLDDR0(73,    2,    592000000),
PLLDDR0(98,    3,    594000000),
PLLDDR0(24,    0,    600000000),
PLLDDR0(100,    3,    606000000),
PLLDDR0(75,    2,    608000000),
PLLDDR0(50,    1,    612000000),
PLLDDR0(76,    2,    616000000),
PLLDDR0(102,    3,    618000000),
PLLDDR0(25,    0,    624000000),
PLLDDR0(104,    3,    630000000),
PLLDDR0(78,    2,    632000000),
PLLDDR0(52,    1,    636000000),
PLLDDR0(79,    2,    640000000),
PLLDDR0(106,    3,    642000000),
PLLDDR0(26,    0,    648000000),
PLLDDR0(108,    3,    654000000),
PLLDDR0(81,    2,    656000000),
PLLDDR0(54,    1,    660000000),
PLLDDR0(82,    2,    664000000),
PLLDDR0(110,    3,    666000000),
PLLDDR0(27,    0,    672000000),
PLLDDR0(112,    3,    678000000),
PLLDDR0(84,    2,    680000000),
PLLDDR0(56,    1,    684000000),
PLLDDR0(85,    2,    688000000),
PLLDDR0(114,    3,    690000000),
PLLDDR0(28,    0,    696000000),
PLLDDR0(116,    3,    702000000),
PLLDDR0(87,    2,    704000000),
PLLDDR0(58,    1,    708000000),
PLLDDR0(88,    2,    712000000),
PLLDDR0(118,    3,    714000000),
PLLDDR0(29,    0,    720000000),
PLLDDR0(120,    3,    726000000),
PLLDDR0(90,    2,    728000000),
PLLDDR0(60,    1,    732000000),
PLLDDR0(91,    2,    736000000),
PLLDDR0(122,    3,    738000000),
PLLDDR0(30,    0,    744000000),
PLLDDR0(124,    3,    750000000),
PLLDDR0(93,    2,    752000000),
PLLDDR0(62,    1,    756000000),
PLLDDR0(94,    2,    760000000),
PLLDDR0(126,    3,    762000000),
PLLDDR0(31,    0,    768000000),
PLLDDR0(96,    2,    776000000),
PLLDDR0(64,    1,    780000000),
PLLDDR0(97,    2,    784000000),
PLLDDR0(32,    0,    792000000),
PLLDDR0(99,    2,    800000000),
PLLDDR0(66,    1,    804000000),
PLLDDR0(100,    2,    808000000),
PLLDDR0(33,    0,    816000000),
PLLDDR0(102,    2,    824000000),
PLLDDR0(68,    1,    828000000),
PLLDDR0(103,    2,    832000000),
PLLDDR0(34,    0,    840000000),
PLLDDR0(105,    2,    848000000),
PLLDDR0(70,    1,    852000000),
PLLDDR0(106,    2,    856000000),
PLLDDR0(35,    0,    864000000),
PLLDDR0(108,    2,    872000000),
PLLDDR0(72,    1,    876000000),
PLLDDR0(109,    2,    880000000),
PLLDDR0(36,    0,    888000000),
PLLDDR0(111,    2,    896000000),
PLLDDR0(74,    1,    900000000),
PLLDDR0(112,    2,    904000000),
PLLDDR0(37,    0,    912000000),
PLLDDR0(114,    2,    920000000),
PLLDDR0(76,    1,    924000000),
PLLDDR0(115,    2,    928000000),
PLLDDR0(38,    0,    936000000),
PLLDDR0(117,    2,    944000000),
PLLDDR0(78,    1,    948000000),
PLLDDR0(118,    2,    952000000),
PLLDDR0(39,    0,    960000000),
PLLDDR0(120,    2,    968000000),
PLLDDR0(80,    1,    972000000),
PLLDDR0(121,    2,    976000000),
PLLDDR0(40,    0,    984000000),
PLLDDR0(123,    2,    992000000),
PLLDDR0(82,    1,    996000000),
PLLDDR0(124,    2,    1000000000),
PLLDDR0(41,    0,    1008000000),
PLLDDR0(42,    0,    1032000000),
PLLDDR0(43,    0,    1056000000),
PLLDDR0(44,    0,    1080000000),
PLLDDR0(45,    0,    1104000000),
PLLDDR0(46,    0,    1128000000),
PLLDDR0(47,    0,    1152000000),
PLLDDR0(48,    0,    1176000000),
PLLDDR0(49,    0,    1200000000),
PLLDDR0(50,    0,    1224000000),
PLLDDR0(51,    0,    1248000000),
PLLDDR0(52,    0,    1272000000),
PLLDDR0(53,    0,    1296000000),
PLLDDR0(54,    0,    1320000000),
PLLDDR0(55,    0,    1344000000),
PLLDDR0(56,    0,    1368000000),
PLLDDR0(57,    0,    1392000000),
PLLDDR0(58,    0,    1416000000),
PLLDDR0(59,    0,    1440000000),
PLLDDR0(60,    0,    1464000000),
PLLDDR0(61,    0,    1488000000),
PLLDDR0(62,    0,    1512000000),
PLLDDR0(63,    0,    1536000000),
PLLDDR0(64,    0,    1560000000),
PLLDDR0(65,    0,    1584000000),
PLLDDR0(66,    0,    1608000000),
PLLDDR0(67,    0,    1632000000),
PLLDDR0(68,    0,    1656000000),
PLLDDR0(69,    0,    1680000000),
PLLDDR0(70,    0,    1704000000),
PLLDDR0(71,    0,    1728000000),
PLLDDR0(72,    0,    1752000000),
PLLDDR0(73,    0,    1776000000),
PLLDDR0(74,    0,    1800000000),
PLLDDR0(75,    0,    1824000000),
PLLDDR0(76,    0,    1848000000),
PLLDDR0(77,    0,    1872000000),
PLLDDR0(78,    0,    1896000000),
PLLDDR0(79,    0,    1920000000),
PLLDDR0(80,    0,    1944000000),
PLLDDR0(81,    0,    1968000000),
PLLDDR0(82,    0,    1992000000),
PLLDDR0(83,    0,    2016000000),
};

/* PLLDDR1(n,m,freq)    F_N8X7_M0X2 */
struct sunxi_clk_factor_freq factor_pllddr1_tbl[] = {
PLLDDR1(19,    3,    120000000),
PLLDDR1(20,    3,    126000000),
PLLDDR1(15,    2,    128000000),
PLLDDR1(21,    3,    132000000),
PLLDDR1(16,    2,    136000000),
PLLDDR1(22,    3,    138000000),
PLLDDR1(11,    1,    144000000),
PLLDDR1(24,    3,    150000000),
PLLDDR1(18,    2,    152000000),
PLLDDR1(12,    1,    156000000),
PLLDDR1(19,    2,    160000000),
PLLDDR1(26,    3,    162000000),
PLLDDR1(6,    0,    168000000),
PLLDDR1(28,    3,    174000000),
PLLDDR1(21,    2,    176000000),
PLLDDR1(14,    1,    180000000),
PLLDDR1(22,    2,    184000000),
PLLDDR1(30,    3,    186000000),
PLLDDR1(7,    0,    192000000),
PLLDDR1(32,    3,    198000000),
PLLDDR1(24,    2,    200000000),
PLLDDR1(16,    1,    204000000),
PLLDDR1(25,    2,    208000000),
PLLDDR1(34,    3,    210000000),
PLLDDR1(8,    0,    216000000),
PLLDDR1(36,    3,    222000000),
PLLDDR1(27,    2,    224000000),
PLLDDR1(18,    1,    228000000),
PLLDDR1(28,    2,    232000000),
PLLDDR1(38,    3,    234000000),
PLLDDR1(9,    0,    240000000),
PLLDDR1(40,    3,    246000000),
PLLDDR1(30,    2,    248000000),
PLLDDR1(20,    1,    252000000),
PLLDDR1(31,    2,    256000000),
PLLDDR1(42,    3,    258000000),
PLLDDR1(10,    0,    264000000),
PLLDDR1(44,    3,    270000000),
PLLDDR1(33,    2,    272000000),
PLLDDR1(22,    1,    276000000),
PLLDDR1(34,    2,    280000000),
PLLDDR1(46,    3,    282000000),
PLLDDR1(11,    0,    288000000),
PLLDDR1(48,    3,    294000000),
PLLDDR1(36,    2,    296000000),
PLLDDR1(24,    1,    300000000),
PLLDDR1(37,    2,    304000000),
PLLDDR1(50,    3,    306000000),
PLLDDR1(12,    0,    312000000),
PLLDDR1(52,    3,    318000000),
PLLDDR1(39,    2,    320000000),
PLLDDR1(26,    1,    324000000),
PLLDDR1(40,    2,    328000000),
PLLDDR1(54,    3,    330000000),
PLLDDR1(13,    0,    336000000),
PLLDDR1(56,    3,    342000000),
PLLDDR1(42,    2,    344000000),
PLLDDR1(28,    1,    348000000),
PLLDDR1(43,    2,    352000000),
PLLDDR1(58,    3,    354000000),
PLLDDR1(14,    0,    360000000),
PLLDDR1(60,    3,    366000000),
PLLDDR1(45,    2,    368000000),
PLLDDR1(30,    1,    372000000),
PLLDDR1(46,    2,    376000000),
PLLDDR1(62,    3,    378000000),
PLLDDR1(15,    0,    384000000),
PLLDDR1(64,    3,    390000000),
PLLDDR1(48,    2,    392000000),
PLLDDR1(32,    1,    396000000),
PLLDDR1(49,    2,    400000000),
PLLDDR1(66,    3,    402000000),
PLLDDR1(16,    0,    408000000),
PLLDDR1(68,    3,    414000000),
PLLDDR1(51,    2,    416000000),
PLLDDR1(34,    1,    420000000),
PLLDDR1(52,    2,    424000000),
PLLDDR1(70,    3,    426000000),
PLLDDR1(17,    0,    432000000),
PLLDDR1(72,    3,    438000000),
PLLDDR1(54,    2,    440000000),
PLLDDR1(36,    1,    444000000),
PLLDDR1(55,    2,    448000000),
PLLDDR1(74,    3,    450000000),
PLLDDR1(18,    0,    456000000),
PLLDDR1(76,    3,    462000000),
PLLDDR1(57,    2,    464000000),
PLLDDR1(38,    1,    468000000),
PLLDDR1(58,    2,    472000000),
PLLDDR1(78,    3,    474000000),
PLLDDR1(19,    0,    480000000),
PLLDDR1(80,    3,    486000000),
PLLDDR1(60,    2,    488000000),
PLLDDR1(40,    1,    492000000),
PLLDDR1(61,    2,    496000000),
PLLDDR1(82,    3,    498000000),
PLLDDR1(20,    0,    504000000),
PLLDDR1(84,    3,    510000000),
PLLDDR1(63,    2,    512000000),
PLLDDR1(42,    1,    516000000),
PLLDDR1(64,    2,    520000000),
PLLDDR1(86,    3,    522000000),
PLLDDR1(21,    0,    528000000),
PLLDDR1(88,    3,    534000000),
PLLDDR1(66,    2,    536000000),
PLLDDR1(44,    1,    540000000),
PLLDDR1(67,    2,    544000000),
PLLDDR1(90,    3,    546000000),
PLLDDR1(22,    0,    552000000),
PLLDDR1(92,    3,    558000000),
PLLDDR1(69,    2,    560000000),
PLLDDR1(46,    1,    564000000),
PLLDDR1(70,    2,    568000000),
PLLDDR1(94,    3,    570000000),
PLLDDR1(23,    0,    576000000),
PLLDDR1(96,    3,    582000000),
PLLDDR1(72,    2,    584000000),
PLLDDR1(48,    1,    588000000),
PLLDDR1(73,    2,    592000000),
PLLDDR1(98,    3,    594000000),
PLLDDR1(24,    0,    600000000),
PLLDDR1(100,    3,    606000000),
PLLDDR1(75,    2,    608000000),
PLLDDR1(50,    1,    612000000),
PLLDDR1(76,    2,    616000000),
PLLDDR1(102,    3,    618000000),
PLLDDR1(25,    0,    624000000),
PLLDDR1(104,    3,    630000000),
PLLDDR1(78,    2,    632000000),
PLLDDR1(52,    1,    636000000),
PLLDDR1(79,    2,    640000000),
PLLDDR1(106,    3,    642000000),
PLLDDR1(26,    0,    648000000),
PLLDDR1(108,    3,    654000000),
PLLDDR1(81,    2,    656000000),
PLLDDR1(54,    1,    660000000),
PLLDDR1(82,    2,    664000000),
PLLDDR1(110,    3,    666000000),
PLLDDR1(27,    0,    672000000),
PLLDDR1(112,    3,    678000000),
PLLDDR1(84,    2,    680000000),
PLLDDR1(56,    1,    684000000),
PLLDDR1(85,    2,    688000000),
PLLDDR1(114,    3,    690000000),
PLLDDR1(28,    0,    696000000),
PLLDDR1(116,    3,    702000000),
PLLDDR1(87,    2,    704000000),
PLLDDR1(58,    1,    708000000),
PLLDDR1(88,    2,    712000000),
PLLDDR1(118,    3,    714000000),
PLLDDR1(29,    0,    720000000),
PLLDDR1(120,    3,    726000000),
PLLDDR1(90,    2,    728000000),
PLLDDR1(60,    1,    732000000),
PLLDDR1(91,    2,    736000000),
PLLDDR1(122,    3,    738000000),
PLLDDR1(30,    0,    744000000),
PLLDDR1(93,    2,    752000000),
PLLDDR1(62,    1,    756000000),
PLLDDR1(94,    2,    760000000),
PLLDDR1(31,    0,    768000000),
PLLDDR1(96,    2,    776000000),
PLLDDR1(64,    1,    780000000),
PLLDDR1(97,    2,    784000000),
PLLDDR1(32,    0,    792000000),
PLLDDR1(99,    2,    800000000),
PLLDDR1(66,    1,    804000000),
PLLDDR1(100,    2,    808000000),
PLLDDR1(33,    0,    816000000),
PLLDDR1(102,    2,    824000000),
PLLDDR1(68,    1,    828000000),
PLLDDR1(103,    2,    832000000),
PLLDDR1(34,    0,    840000000),
PLLDDR1(105,    2,    848000000),
PLLDDR1(70,    1,    852000000),
PLLDDR1(106,    2,    856000000),
PLLDDR1(35,    0,    864000000),
PLLDDR1(108,    2,    872000000),
PLLDDR1(72,    1,    876000000),
PLLDDR1(109,    2,    880000000),
PLLDDR1(36,    0,    888000000),
PLLDDR1(111,    2,    896000000),
PLLDDR1(74,    1,    900000000),
PLLDDR1(112,    2,    904000000),
PLLDDR1(37,    0,    912000000),
PLLDDR1(114,    2,    920000000),
PLLDDR1(76,    1,    924000000),
PLLDDR1(115,    2,    928000000),
PLLDDR1(38,    0,    936000000),
PLLDDR1(117,    2,    944000000),
PLLDDR1(78,    1,    948000000),
PLLDDR1(118,    2,    952000000),
PLLDDR1(39,    0,    960000000),
PLLDDR1(120,    2,    968000000),
PLLDDR1(80,    1,    972000000),
PLLDDR1(121,    2,    976000000),
PLLDDR1(40,    0,    984000000),
PLLDDR1(123,    2,    992000000),
PLLDDR1(82,    1,    996000000),
PLLDDR1(124,    2,    1000000000),
PLLDDR1(41,    0,    1008000000),
PLLDDR1(84,    1,    1020000000),
PLLDDR1(42,    0,    1032000000),
PLLDDR1(86,    1,    1044000000),
PLLDDR1(43,    0,    1056000000),
PLLDDR1(88,    1,    1068000000),
PLLDDR1(44,    0,    1080000000),
PLLDDR1(90,    1,    1092000000),
PLLDDR1(45,    0,    1104000000),
PLLDDR1(92,    1,    1116000000),
PLLDDR1(46,    0,    1128000000),
PLLDDR1(94,    1,    1140000000),
PLLDDR1(47,    0,    1152000000),
PLLDDR1(96,    1,    1164000000),
PLLDDR1(48,    0,    1176000000),
PLLDDR1(98,    1,    1188000000),
PLLDDR1(49,    0,    1200000000),
PLLDDR1(100,    1,    1212000000),
PLLDDR1(50,    0,    1224000000),
PLLDDR1(102,    1,    1236000000),
PLLDDR1(51,    0,    1248000000),
PLLDDR1(104,    1,    1260000000),
PLLDDR1(52,    0,    1272000000),
PLLDDR1(106,    1,    1284000000),
PLLDDR1(53,    0,    1296000000),
PLLDDR1(108,    1,    1308000000),
PLLDDR1(54,    0,    1320000000),
PLLDDR1(110,    1,    1332000000),
PLLDDR1(55,    0,    1344000000),
PLLDDR1(112,    1,    1356000000),
PLLDDR1(56,    0,    1368000000),
PLLDDR1(114,    1,    1380000000),
PLLDDR1(57,    0,    1392000000),
PLLDDR1(116,    1,    1404000000),
PLLDDR1(58,    0,    1416000000),
PLLDDR1(118,    1,    1428000000),
PLLDDR1(59,    0,    1440000000),
PLLDDR1(120,    1,    1452000000),
PLLDDR1(60,    0,    1464000000),
PLLDDR1(122,    1,    1476000000),
PLLDDR1(61,    0,    1488000000),
PLLDDR1(124,    1,    1500000000),
PLLDDR1(62,    0,    1512000000),
PLLDDR1(63,    0,    1536000000),
PLLDDR1(64,    0,    1560000000),
PLLDDR1(65,    0,    1584000000),
PLLDDR1(66,    0,    1608000000),
PLLDDR1(67,    0,    1632000000),
PLLDDR1(68,    0,    1656000000),
PLLDDR1(69,    0,    1680000000),
PLLDDR1(70,    0,    1704000000),
PLLDDR1(71,    0,    1728000000),
PLLDDR1(72,    0,    1752000000),
PLLDDR1(73,    0,    1776000000),
PLLDDR1(74,    0,    1800000000),
PLLDDR1(75,    0,    1824000000),
PLLDDR1(76,    0,    1848000000),
PLLDDR1(77,    0,    1872000000),
PLLDDR1(78,    0,    1896000000),
PLLDDR1(79,    0,    1920000000),
};

/* PLLPERIPH0(n,k,freq)    F_N8X5_K4X2 */
struct sunxi_clk_factor_freq factor_pllperiph0_tbl[] = {
PLLPERIPH0(5,    0,    72000000),
PLLPERIPH0(6,    0,    84000000),
PLLPERIPH0(7,    0,    96000000),
PLLPERIPH0(8,    0,    108000000),
PLLPERIPH0(9,    0,    120000000),
PLLPERIPH0(10,    0,    132000000),
PLLPERIPH0(11,    0,    144000000),
PLLPERIPH0(12,    0,    156000000),
PLLPERIPH0(13,    0,    168000000),
PLLPERIPH0(14,    0,    180000000),
PLLPERIPH0(15,    0,    192000000),
PLLPERIPH0(16,    0,    204000000),
PLLPERIPH0(17,    0,    216000000),
PLLPERIPH0(18,    0,    228000000),
PLLPERIPH0(19,    0,    240000000),
PLLPERIPH0(20,    0,    252000000),
PLLPERIPH0(21,    0,    264000000),
PLLPERIPH0(22,    0,    276000000),
PLLPERIPH0(23,    0,    288000000),
PLLPERIPH0(24,    0,    300000000),
PLLPERIPH0(25,    0,    312000000),
PLLPERIPH0(26,    0,    324000000),
PLLPERIPH0(27,    0,    336000000),
PLLPERIPH0(28,    0,    348000000),
PLLPERIPH0(29,    0,    360000000),
PLLPERIPH0(30,    0,    372000000),
PLLPERIPH0(31,    0,    384000000),
PLLPERIPH0(10,    2,    396000000),
PLLPERIPH0(16,    1,    408000000),
PLLPERIPH0(17,    1,    432000000),
PLLPERIPH0(18,    1,    456000000),
PLLPERIPH0(12,    2,    468000000),
PLLPERIPH0(19,    1,    480000000),
PLLPERIPH0(20,    1,    504000000),
PLLPERIPH0(21,    1,    528000000),
PLLPERIPH0(14,    2,    540000000),
PLLPERIPH0(22,    1,    552000000),
PLLPERIPH0(23,    1,    576000000),
PLLPERIPH0(24,    1,    600000000),
PLLPERIPH0(16,    2,    612000000),
PLLPERIPH0(25,    1,    624000000),
PLLPERIPH0(26,    1,    648000000),
PLLPERIPH0(27,    1,    672000000),
PLLPERIPH0(18,    2,    684000000),
PLLPERIPH0(28,    1,    696000000),
PLLPERIPH0(29,    1,    720000000),
PLLPERIPH0(30,    1,    744000000),
PLLPERIPH0(20,    2,    756000000),
PLLPERIPH0(15,    3,    768000000),
PLLPERIPH0(21,    2,    792000000),
PLLPERIPH0(16,    3,    816000000),
PLLPERIPH0(17,    3,    864000000),
};

/* PLLPERIPH1(n,k,freq)    F_N8X5_K4X2 */
struct sunxi_clk_factor_freq factor_pllperiph1_tbl[] = {
PLLPERIPH1(5,    0,    72000000),
PLLPERIPH1(6,    0,    84000000),
PLLPERIPH1(7,    0,    96000000),
PLLPERIPH1(8,    0,    108000000),
PLLPERIPH1(9,    0,    120000000),
PLLPERIPH1(10,    0,    132000000),
PLLPERIPH1(11,    0,    144000000),
PLLPERIPH1(12,    0,    156000000),
PLLPERIPH1(13,    0,    168000000),
PLLPERIPH1(14,    0,    180000000),
PLLPERIPH1(15,    0,    192000000),
PLLPERIPH1(16,    0,    204000000),
PLLPERIPH1(17,    0,    216000000),
PLLPERIPH1(18,    0,    228000000),
PLLPERIPH1(19,    0,    240000000),
PLLPERIPH1(20,    0,    252000000),
PLLPERIPH1(21,    0,    264000000),
PLLPERIPH1(22,    0,    276000000),
PLLPERIPH1(23,    0,    288000000),
PLLPERIPH1(24,    0,    300000000),
PLLPERIPH1(25,    0,    312000000),
PLLPERIPH1(26,    0,    324000000),
PLLPERIPH1(27,    0,    336000000),
PLLPERIPH1(28,    0,    348000000),
PLLPERIPH1(29,    0,    360000000),
PLLPERIPH1(30,    0,    372000000),
PLLPERIPH1(31,    0,    384000000),
PLLPERIPH1(10,    2,    396000000),
PLLPERIPH1(16,    1,    408000000),
PLLPERIPH1(17,    1,    432000000),
PLLPERIPH1(18,    1,    456000000),
PLLPERIPH1(12,    2,    468000000),
PLLPERIPH1(19,    1,    480000000),
PLLPERIPH1(20,    1,    504000000),
PLLPERIPH1(21,    1,    528000000),
PLLPERIPH1(14,    2,    540000000),
PLLPERIPH1(22,    1,    552000000),
PLLPERIPH1(23,    1,    576000000),
PLLPERIPH1(24,    1,    600000000),
PLLPERIPH1(16,    2,    612000000),
PLLPERIPH1(25,    1,    624000000),
PLLPERIPH1(26,    1,    648000000),
PLLPERIPH1(27,    1,    672000000),
PLLPERIPH1(18,    2,    684000000),
PLLPERIPH1(28,    1,    696000000),
PLLPERIPH1(29,    1,    720000000),
PLLPERIPH1(30,    1,    744000000),
PLLPERIPH1(20,    2,    756000000),
PLLPERIPH1(15,    3,    768000000),
PLLPERIPH1(21,    2,    792000000),
PLLPERIPH1(16,    3,    816000000),
PLLPERIPH1(17,    3,    864000000),
};

/* PLLGPU(n,m,freq)    F_N8X7_M0X4 */
struct sunxi_clk_factor_freq factor_pllgpu_tbl[] = {
PLLGPU(3,    0,    96000000),
PLLGPU(16,    3,    102000000),
PLLGPU(12,    2,    104000000),
PLLGPU(8,    1,    108000000),
PLLGPU(13,    2,    112000000),
PLLGPU(18,    3,    114000000),
PLLGPU(4,    0,    120000000),
PLLGPU(20,    3,    126000000),
PLLGPU(15,    2,    128000000),
PLLGPU(10,    1,    132000000),
PLLGPU(16,    2,    136000000),
PLLGPU(22,    3,    138000000),
PLLGPU(5,    0,    144000000),
PLLGPU(24,    3,    150000000),
PLLGPU(18,    2,    152000000),
PLLGPU(12,    1,    156000000),
PLLGPU(19,    2,    160000000),
PLLGPU(26,    3,    162000000),
PLLGPU(6,    0,    168000000),
PLLGPU(28,    3,    174000000),
PLLGPU(21,    2,    176000000),
PLLGPU(14,    1,    180000000),
PLLGPU(22,    2,    184000000),
PLLGPU(30,    3,    186000000),
PLLGPU(7,    0,    192000000),
PLLGPU(32,    3,    198000000),
PLLGPU(24,    2,    200000000),
PLLGPU(16,    1,    204000000),
PLLGPU(25,    2,    208000000),
PLLGPU(34,    3,    210000000),
PLLGPU(8,    0,    216000000),
PLLGPU(36,    3,    222000000),
PLLGPU(27,    2,    224000000),
PLLGPU(18,    1,    228000000),
PLLGPU(28,    2,    232000000),
PLLGPU(38,    3,    234000000),
PLLGPU(9,    0,    240000000),
PLLGPU(40,    3,    246000000),
PLLGPU(30,    2,    248000000),
PLLGPU(20,    1,    252000000),
PLLGPU(31,    2,    256000000),
PLLGPU(42,    3,    258000000),
PLLGPU(10,    0,    264000000),
PLLGPU(44,    3,    270000000),
PLLGPU(33,    2,    272000000),
PLLGPU(22,    1,    276000000),
PLLGPU(34,    2,    280000000),
PLLGPU(46,    3,    282000000),
PLLGPU(11,    0,    288000000),
PLLGPU(48,    3,    294000000),
PLLGPU(36,    2,    296000000),
PLLGPU(24,    1,    300000000),
PLLGPU(37,    2,    304000000),
PLLGPU(50,    3,    306000000),
PLLGPU(12,    0,    312000000),
PLLGPU(52,    3,    318000000),
PLLGPU(39,    2,    320000000),
PLLGPU(26,    1,    324000000),
PLLGPU(40,    2,    328000000),
PLLGPU(54,    3,    330000000),
PLLGPU(13,    0,    336000000),
PLLGPU(56,    3,    342000000),
PLLGPU(42,    2,    344000000),
PLLGPU(28,    1,    348000000),
PLLGPU(43,    2,    352000000),
PLLGPU(58,    3,    354000000),
PLLGPU(14,    0,    360000000),
PLLGPU(60,    3,    366000000),
PLLGPU(45,    2,    368000000),
PLLGPU(30,    1,    372000000),
PLLGPU(46,    2,    376000000),
PLLGPU(62,    3,    378000000),
PLLGPU(15,    0,    384000000),
PLLGPU(64,    3,    390000000),
PLLGPU(48,    2,    392000000),
PLLGPU(32,    1,    396000000),
PLLGPU(49,    2,    400000000),
PLLGPU(66,    3,    402000000),
PLLGPU(16,    0,    408000000),
PLLGPU(68,    3,    414000000),
PLLGPU(51,    2,    416000000),
PLLGPU(34,    1,    420000000),
PLLGPU(52,    2,    424000000),
PLLGPU(70,    3,    426000000),
PLLGPU(17,    0,    432000000),
PLLGPU(72,    3,    438000000),
PLLGPU(54,    2,    440000000),
PLLGPU(36,    1,    444000000),
PLLGPU(55,    2,    448000000),
PLLGPU(74,    3,    450000000),
PLLGPU(18,    0,    456000000),
PLLGPU(76,    3,    462000000),
PLLGPU(57,    2,    464000000),
PLLGPU(38,    1,    468000000),
PLLGPU(58,    2,    472000000),
PLLGPU(78,    3,    474000000),
PLLGPU(19,    0,    480000000),
PLLGPU(80,    3,    486000000),
PLLGPU(60,    2,    488000000),
PLLGPU(40,    1,    492000000),
PLLGPU(61,    2,    496000000),
PLLGPU(82,    3,    498000000),
PLLGPU(20,    0,    504000000),
PLLGPU(84,    3,    510000000),
PLLGPU(63,    2,    512000000),
PLLGPU(42,    1,    516000000),
PLLGPU(64,    2,    520000000),
PLLGPU(86,    3,    522000000),
PLLGPU(21,    0,    528000000),
PLLGPU(88,    3,    534000000),
PLLGPU(66,    2,    536000000),
PLLGPU(44,    1,    540000000),
PLLGPU(67,    2,    544000000),
PLLGPU(90,    3,    546000000),
PLLGPU(22,    0,    552000000),
PLLGPU(92,    3,    558000000),
PLLGPU(69,    2,    560000000),
PLLGPU(46,    1,    564000000),
PLLGPU(70,    2,    568000000),
PLLGPU(94,    3,    570000000),
PLLGPU(23,    0,    576000000),
PLLGPU(96,    3,    582000000),
PLLGPU(72,    2,    584000000),
PLLGPU(48,    1,    588000000),
PLLGPU(73,    2,    592000000),
PLLGPU(98,    3,    594000000),
PLLGPU(24,    0,    600000000),
PLLGPU(100,    3,    606000000),
PLLGPU(75,    2,    608000000),
PLLGPU(50,    1,    612000000),
PLLGPU(76,    2,    616000000),
PLLGPU(102,    3,    618000000),
PLLGPU(25,    0,    624000000),
PLLGPU(104,    3,    630000000),
PLLGPU(78,    2,    632000000),
PLLGPU(52,    1,    636000000),
PLLGPU(79,    2,    640000000),
PLLGPU(106,    3,    642000000),
PLLGPU(26,    0,    648000000),
PLLGPU(108,    3,    654000000),
PLLGPU(81,    2,    656000000),
PLLGPU(54,    1,    660000000),
PLLGPU(82,    2,    664000000),
PLLGPU(110,    3,    666000000),
PLLGPU(27,    0,    672000000),
PLLGPU(112,    3,    678000000),
PLLGPU(84,    2,    680000000),
PLLGPU(56,    1,    684000000),
PLLGPU(85,    2,    688000000),
PLLGPU(114,    3,    690000000),
PLLGPU(28,    0,    696000000),
PLLGPU(116,    3,    702000000),
PLLGPU(87,    2,    704000000),
PLLGPU(58,    1,    708000000),
PLLGPU(88,    2,    712000000),
PLLGPU(118,    3,    714000000),
PLLGPU(29,    0,    720000000),
PLLGPU(120,    3,    726000000),
PLLGPU(90,    2,    728000000),
PLLGPU(60,    1,    732000000),
PLLGPU(91,    2,    736000000),
PLLGPU(122,    3,    738000000),
PLLGPU(30,    0,    744000000),
PLLGPU(124,    3,    750000000),
PLLGPU(93,    2,    752000000),
PLLGPU(62,    1,    756000000),
PLLGPU(94,    2,    760000000),
PLLGPU(126,    3,    762000000),
PLLGPU(31,    0,    768000000),
PLLGPU(96,    2,    776000000),
PLLGPU(64,    1,    780000000),
PLLGPU(97,    2,    784000000),
PLLGPU(32,    0,    792000000),
PLLGPU(99,    2,    800000000),
PLLGPU(66,    1,    804000000),
PLLGPU(100,    2,    808000000),
PLLGPU(33,    0,    816000000),
PLLGPU(102,    2,    824000000),
PLLGPU(68,    1,    828000000),
PLLGPU(103,    2,    832000000),
PLLGPU(34,    0,    840000000),
PLLGPU(105,    2,    848000000),
PLLGPU(70,    1,    852000000),
PLLGPU(106,    2,    856000000),
PLLGPU(35,    0,    864000000),
PLLGPU(108,    2,    872000000),
PLLGPU(72,    1,    876000000),
PLLGPU(109,    2,    880000000),
PLLGPU(36,    0,    888000000),
};

/* PLLVIDEO0(n,m,freq)    F_N8X7_M0X4 */
struct sunxi_clk_factor_freq factor_pllvideo0_tbl[] = {
PLLVIDEO0(3,    0,    96000000),
PLLVIDEO0(16,    3,    102000000),
PLLVIDEO0(12,    2,    104000000),
PLLVIDEO0(8,    1,    108000000),
PLLVIDEO0(13,    2,    112000000),
PLLVIDEO0(18,    3,    114000000),
PLLVIDEO0(4,    0,    120000000),
PLLVIDEO0(20,    3,    126000000),
PLLVIDEO0(15,    2,    128000000),
PLLVIDEO0(10,    1,    132000000),
PLLVIDEO0(16,    2,    136000000),
PLLVIDEO0(22,    3,    138000000),
PLLVIDEO0(5,    0,    144000000),
PLLVIDEO0(24,    3,    150000000),
PLLVIDEO0(18,    2,    152000000),
PLLVIDEO0(12,    1,    156000000),
PLLVIDEO0(19,    2,    160000000),
PLLVIDEO0(26,    3,    162000000),
PLLVIDEO0(6,    0,    168000000),
PLLVIDEO0(28,    3,    174000000),
PLLVIDEO0(21,    2,    176000000),
PLLVIDEO0(14,    1,    180000000),
PLLVIDEO0(22,    2,    184000000),
PLLVIDEO0(30,    3,    186000000),
PLLVIDEO0(7,    0,    192000000),
PLLVIDEO0(32,    3,    198000000),
PLLVIDEO0(24,    2,    200000000),
PLLVIDEO0(16,    1,    204000000),
PLLVIDEO0(25,    2,    208000000),
PLLVIDEO0(34,    3,    210000000),
PLLVIDEO0(8,    0,    216000000),
PLLVIDEO0(36,    3,    222000000),
PLLVIDEO0(27,    2,    224000000),
PLLVIDEO0(18,    1,    228000000),
PLLVIDEO0(28,    2,    232000000),
PLLVIDEO0(38,    3,    234000000),
PLLVIDEO0(9,    0,    240000000),
PLLVIDEO0(40,    3,    246000000),
PLLVIDEO0(30,    2,    248000000),
PLLVIDEO0(20,    1,    252000000),
PLLVIDEO0(31,    2,    256000000),
PLLVIDEO0(42,    3,    258000000),
PLLVIDEO0(10,    0,    264000000),
PLLVIDEO0(44,    3,    270000000),
PLLVIDEO0(33,    2,    272000000),
PLLVIDEO0(22,    1,    276000000),
PLLVIDEO0(34,    2,    280000000),
PLLVIDEO0(46,    3,    282000000),
PLLVIDEO0(11,    0,    288000000),
PLLVIDEO0(48,    3,    294000000),
PLLVIDEO0(36,    2,    296000000),
PLLVIDEO0(24,    1,    300000000),
PLLVIDEO0(37,    2,    304000000),
PLLVIDEO0(50,    3,    306000000),
PLLVIDEO0(12,    0,    312000000),
PLLVIDEO0(52,    3,    318000000),
PLLVIDEO0(39,    2,    320000000),
PLLVIDEO0(26,    1,    324000000),
PLLVIDEO0(40,    2,    328000000),
PLLVIDEO0(54,    3,    330000000),
PLLVIDEO0(13,    0,    336000000),
PLLVIDEO0(56,    3,    342000000),
PLLVIDEO0(42,    2,    344000000),
PLLVIDEO0(28,    1,    348000000),
PLLVIDEO0(43,    2,    352000000),
PLLVIDEO0(58,    3,    354000000),
PLLVIDEO0(118,    7,    357000000),
PLLVIDEO0(14,    0,    360000000),
PLLVIDEO0(60,    3,    366000000),
PLLVIDEO0(45,    2,    368000000),
PLLVIDEO0(30,    1,    372000000),
PLLVIDEO0(46,    2,    376000000),
PLLVIDEO0(62,    3,    378000000),
PLLVIDEO0(15,    0,    384000000),
PLLVIDEO0(64,    3,    390000000),
PLLVIDEO0(48,    2,    392000000),
PLLVIDEO0(32,    1,    396000000),
PLLVIDEO0(49,    2,    400000000),
PLLVIDEO0(66,    3,    402000000),
PLLVIDEO0(16,    0,    408000000),
PLLVIDEO0(68,    3,    414000000),
PLLVIDEO0(51,    2,    416000000),
PLLVIDEO0(34,    1,    420000000),
PLLVIDEO0(52,    2,    424000000),
PLLVIDEO0(70,    3,    426000000),
PLLVIDEO0(17,    0,    432000000),
PLLVIDEO0(72,    3,    438000000),
PLLVIDEO0(54,    2,    440000000),
PLLVIDEO0(36,    1,    444000000),
PLLVIDEO0(55,    2,    448000000),
PLLVIDEO0(74,    3,    450000000),
PLLVIDEO0(18,    0,    456000000),
PLLVIDEO0(76,    3,    462000000),
PLLVIDEO0(57,    2,    464000000),
PLLVIDEO0(38,    1,    468000000),
PLLVIDEO0(58,    2,    472000000),
PLLVIDEO0(78,    3,    474000000),
PLLVIDEO0(19,    0,    480000000),
PLLVIDEO0(80,    3,    486000000),
PLLVIDEO0(60,    2,    488000000),
PLLVIDEO0(40,    1,    492000000),
PLLVIDEO0(61,    2,    496000000),
PLLVIDEO0(82,    3,    498000000),
PLLVIDEO0(20,    0,    504000000),
PLLVIDEO0(84,    3,    510000000),
PLLVIDEO0(63,    2,    512000000),
PLLVIDEO0(42,    1,    516000000),
PLLVIDEO0(64,    2,    520000000),
PLLVIDEO0(86,    3,    522000000),
PLLVIDEO0(21,    0,    528000000),
PLLVIDEO0(88,    3,    534000000),
PLLVIDEO0(66,    2,    536000000),
PLLVIDEO0(44,    1,    540000000),
PLLVIDEO0(67,    2,    544000000),
PLLVIDEO0(90,    3,    546000000),
PLLVIDEO0(22,    0,    552000000),
PLLVIDEO0(92,    3,    558000000),
PLLVIDEO0(69,    2,    560000000),
PLLVIDEO0(46,    1,    564000000),
PLLVIDEO0(70,    2,    568000000),
PLLVIDEO0(94,    3,    570000000),
PLLVIDEO0(23,    0,    576000000),
PLLVIDEO0(96,    3,    582000000),
PLLVIDEO0(72,    2,    584000000),
PLLVIDEO0(48,    1,    588000000),
PLLVIDEO0(73,    2,    592000000),
PLLVIDEO0(98,    3,    594000000),
PLLVIDEO0(24,    0,    600000000),
PLLVIDEO0(100,    3,    606000000),
PLLVIDEO0(75,    2,    608000000),
PLLVIDEO0(50,    1,    612000000),
PLLVIDEO0(76,    2,    616000000),
PLLVIDEO0(102,    3,    618000000),
PLLVIDEO0(25,    0,    624000000),
PLLVIDEO0(104,    3,    630000000),
PLLVIDEO0(78,    2,    632000000),
PLLVIDEO0(52,    1,    636000000),
PLLVIDEO0(79,    2,    640000000),
PLLVIDEO0(106,    3,    642000000),
PLLVIDEO0(26,    0,    648000000),
PLLVIDEO0(108,    3,    654000000),
PLLVIDEO0(81,    2,    656000000),
PLLVIDEO0(54,    1,    660000000),
PLLVIDEO0(82,    2,    664000000),
PLLVIDEO0(110,    3,    666000000),
PLLVIDEO0(27,    0,    672000000),
PLLVIDEO0(112,    3,    678000000),
PLLVIDEO0(84,    2,    680000000),
PLLVIDEO0(56,    1,    684000000),
PLLVIDEO0(85,    2,    688000000),
PLLVIDEO0(114,    3,    690000000),
PLLVIDEO0(28,    0,    696000000),
PLLVIDEO0(116,    3,    702000000),
PLLVIDEO0(87,    2,    704000000),
PLLVIDEO0(58,    1,    708000000),
PLLVIDEO0(88,    2,    712000000),
PLLVIDEO0(118,    3,    714000000),
PLLVIDEO0(29,    0,    720000000),
PLLVIDEO0(120,    3,    726000000),
PLLVIDEO0(90,    2,    728000000),
PLLVIDEO0(60,    1,    732000000),
PLLVIDEO0(91,    2,    736000000),
PLLVIDEO0(122,    3,    738000000),
PLLVIDEO0(30,    0,    744000000),
PLLVIDEO0(124,    3,    750000000),
PLLVIDEO0(93,    2,    752000000),
PLLVIDEO0(62,    1,    756000000),
PLLVIDEO0(94,    2,    760000000),
PLLVIDEO0(126,    3,    762000000),
PLLVIDEO0(31,    0,    768000000),
PLLVIDEO0(96,    2,    776000000),
PLLVIDEO0(64,    1,    780000000),
PLLVIDEO0(97,    2,    784000000),
PLLVIDEO0(32,    0,    792000000),
PLLVIDEO0(99,    2,    800000000),
PLLVIDEO0(66,    1,    804000000),
PLLVIDEO0(100,    2,    808000000),
PLLVIDEO0(33,    0,    816000000),
PLLVIDEO0(102,    2,    824000000),
PLLVIDEO0(68,    1,    828000000),
PLLVIDEO0(103,    2,    832000000),
PLLVIDEO0(34,    0,    840000000),
PLLVIDEO0(105,    2,    848000000),
PLLVIDEO0(70,    1,    852000000),
PLLVIDEO0(106,    2,    856000000),
PLLVIDEO0(35,    0,    864000000),
PLLVIDEO0(108,    2,    872000000),
PLLVIDEO0(72,    1,    876000000),
PLLVIDEO0(109,    2,    880000000),
PLLVIDEO0(36,    0,    888000000),
};

/* PLLVIDEO0(n,m,freq)    F_N8X7_M0X4 */
struct sunxi_clk_factor_freq factor_pllvideo1_tbl[] = {
PLLVIDEO1(3,    0,    96000000),
PLLVIDEO1(16,    3,    102000000),
PLLVIDEO1(12,    2,    104000000),
PLLVIDEO1(8,    1,    108000000),
PLLVIDEO1(13,    2,    112000000),
PLLVIDEO1(18,    3,    114000000),
PLLVIDEO1(4,    0,    120000000),
PLLVIDEO1(20,    3,    126000000),
PLLVIDEO1(15,    2,    128000000),
PLLVIDEO1(10,    1,    132000000),
PLLVIDEO1(16,    2,    136000000),
PLLVIDEO1(22,    3,    138000000),
PLLVIDEO1(5,    0,    144000000),
PLLVIDEO1(24,    3,    150000000),
PLLVIDEO1(18,    2,    152000000),
PLLVIDEO1(12,    1,    156000000),
PLLVIDEO1(19,    2,    160000000),
PLLVIDEO1(26,    3,    162000000),
PLLVIDEO1(6,    0,    168000000),
PLLVIDEO1(28,    3,    174000000),
PLLVIDEO1(21,    2,    176000000),
PLLVIDEO1(14,    1,    180000000),
PLLVIDEO1(22,    2,    184000000),
PLLVIDEO1(30,    3,    186000000),
PLLVIDEO1(7,    0,    192000000),
PLLVIDEO1(32,    3,    198000000),
PLLVIDEO1(24,    2,    200000000),
PLLVIDEO1(16,    1,    204000000),
PLLVIDEO1(25,    2,    208000000),
PLLVIDEO1(34,    3,    210000000),
PLLVIDEO1(8,    0,    216000000),
PLLVIDEO1(36,    3,    222000000),
PLLVIDEO1(27,    2,    224000000),
PLLVIDEO1(18,    1,    228000000),
PLLVIDEO1(28,    2,    232000000),
PLLVIDEO1(38,    3,    234000000),
PLLVIDEO1(9,    0,    240000000),
PLLVIDEO1(40,    3,    246000000),
PLLVIDEO1(30,    2,    248000000),
PLLVIDEO1(20,    1,    252000000),
PLLVIDEO1(31,    2,    256000000),
PLLVIDEO1(42,    3,    258000000),
PLLVIDEO1(10,    0,    264000000),
PLLVIDEO1(44,    3,    270000000),
PLLVIDEO1(33,    2,    272000000),
PLLVIDEO1(22,    1,    276000000),
PLLVIDEO1(34,    2,    280000000),
PLLVIDEO1(46,    3,    282000000),
PLLVIDEO1(11,    0,    288000000),
PLLVIDEO1(48,    3,    294000000),
PLLVIDEO1(36,    2,    296000000),
PLLVIDEO1(24,    1,    300000000),
PLLVIDEO1(37,    2,    304000000),
PLLVIDEO1(50,    3,    306000000),
PLLVIDEO1(12,    0,    312000000),
PLLVIDEO1(52,    3,    318000000),
PLLVIDEO1(39,    2,    320000000),
PLLVIDEO1(26,    1,    324000000),
PLLVIDEO1(40,    2,    328000000),
PLLVIDEO1(54,    3,    330000000),
PLLVIDEO1(13,    0,    336000000),
PLLVIDEO1(56,    3,    342000000),
PLLVIDEO1(42,    2,    344000000),
PLLVIDEO1(28,    1,    348000000),
PLLVIDEO1(43,    2,    352000000),
PLLVIDEO1(58,    3,    354000000),
PLLVIDEO1(14,    0,    360000000),
PLLVIDEO1(60,    3,    366000000),
PLLVIDEO1(45,    2,    368000000),
PLLVIDEO1(30,    1,    372000000),
PLLVIDEO1(46,    2,    376000000),
PLLVIDEO1(62,    3,    378000000),
PLLVIDEO1(15,    0,    384000000),
PLLVIDEO1(64,    3,    390000000),
PLLVIDEO1(48,    2,    392000000),
PLLVIDEO1(32,    1,    396000000),
PLLVIDEO1(49,    2,    400000000),
PLLVIDEO1(66,    3,    402000000),
PLLVIDEO1(16,    0,    408000000),
PLLVIDEO1(68,    3,    414000000),
PLLVIDEO1(51,    2,    416000000),
PLLVIDEO1(34,    1,    420000000),
PLLVIDEO1(52,    2,    424000000),
PLLVIDEO1(70,    3,    426000000),
PLLVIDEO1(17,    0,    432000000),
PLLVIDEO1(72,    3,    438000000),
PLLVIDEO1(54,    2,    440000000),
PLLVIDEO1(36,    1,    444000000),
PLLVIDEO1(55,    2,    448000000),
PLLVIDEO1(74,    3,    450000000),
PLLVIDEO1(18,    0,    456000000),
PLLVIDEO1(76,    3,    462000000),
PLLVIDEO1(57,    2,    464000000),
PLLVIDEO1(38,    1,    468000000),
PLLVIDEO1(58,    2,    472000000),
PLLVIDEO1(78,    3,    474000000),
PLLVIDEO1(19,    0,    480000000),
PLLVIDEO1(80,    3,    486000000),
PLLVIDEO1(60,    2,    488000000),
PLLVIDEO1(40,    1,    492000000),
PLLVIDEO1(61,    2,    496000000),
PLLVIDEO1(82,    3,    498000000),
PLLVIDEO1(20,    0,    504000000),
PLLVIDEO1(84,    3,    510000000),
PLLVIDEO1(63,    2,    512000000),
PLLVIDEO1(42,    1,    516000000),
PLLVIDEO1(64,    2,    520000000),
PLLVIDEO1(86,    3,    522000000),
PLLVIDEO1(21,    0,    528000000),
PLLVIDEO1(88,    3,    534000000),
PLLVIDEO1(66,    2,    536000000),
PLLVIDEO1(44,    1,    540000000),
PLLVIDEO1(67,    2,    544000000),
PLLVIDEO1(90,    3,    546000000),
PLLVIDEO1(22,    0,    552000000),
PLLVIDEO1(92,    3,    558000000),
PLLVIDEO1(69,    2,    560000000),
PLLVIDEO1(46,    1,    564000000),
PLLVIDEO1(70,    2,    568000000),
PLLVIDEO1(94,    3,    570000000),
PLLVIDEO1(23,    0,    576000000),
PLLVIDEO1(96,    3,    582000000),
PLLVIDEO1(72,    2,    584000000),
PLLVIDEO1(48,    1,    588000000),
PLLVIDEO1(73,    2,    592000000),
PLLVIDEO1(98,    3,    594000000),
PLLVIDEO1(24,    0,    600000000),
PLLVIDEO1(100,    3,    606000000),
PLLVIDEO1(75,    2,    608000000),
PLLVIDEO1(50,    1,    612000000),
PLLVIDEO1(76,    2,    616000000),
PLLVIDEO1(102,    3,    618000000),
PLLVIDEO1(25,    0,    624000000),
PLLVIDEO1(104,    3,    630000000),
PLLVIDEO1(78,    2,    632000000),
PLLVIDEO1(52,    1,    636000000),
PLLVIDEO1(79,    2,    640000000),
PLLVIDEO1(106,    3,    642000000),
PLLVIDEO1(26,    0,    648000000),
PLLVIDEO1(108,    3,    654000000),
PLLVIDEO1(81,    2,    656000000),
PLLVIDEO1(54,    1,    660000000),
PLLVIDEO1(82,    2,    664000000),
PLLVIDEO1(110,    3,    666000000),
PLLVIDEO1(27,    0,    672000000),
PLLVIDEO1(112,    3,    678000000),
PLLVIDEO1(84,    2,    680000000),
PLLVIDEO1(56,    1,    684000000),
PLLVIDEO1(85,    2,    688000000),
PLLVIDEO1(114,    3,    690000000),
PLLVIDEO1(28,    0,    696000000),
PLLVIDEO1(116,    3,    702000000),
PLLVIDEO1(87,    2,    704000000),
PLLVIDEO1(58,    1,    708000000),
PLLVIDEO1(88,    2,    712000000),
PLLVIDEO1(118,    3,    714000000),
PLLVIDEO1(29,    0,    720000000),
PLLVIDEO1(120,    3,    726000000),
PLLVIDEO1(90,    2,    728000000),
PLLVIDEO1(60,    1,    732000000),
PLLVIDEO1(91,    2,    736000000),
PLLVIDEO1(122,    3,    738000000),
PLLVIDEO1(30,    0,    744000000),
PLLVIDEO1(124,    3,    750000000),
PLLVIDEO1(93,    2,    752000000),
PLLVIDEO1(62,    1,    756000000),
PLLVIDEO1(94,    2,    760000000),
PLLVIDEO1(126,    3,    762000000),
PLLVIDEO1(31,    0,    768000000),
PLLVIDEO1(96,    2,    776000000),
PLLVIDEO1(64,    1,    780000000),
PLLVIDEO1(97,    2,    784000000),
PLLVIDEO1(32,    0,    792000000),
PLLVIDEO1(99,    2,    800000000),
PLLVIDEO1(66,    1,    804000000),
PLLVIDEO1(100,    2,    808000000),
PLLVIDEO1(33,    0,    816000000),
PLLVIDEO1(102,    2,    824000000),
PLLVIDEO1(68,    1,    828000000),
PLLVIDEO1(103,    2,    832000000),
PLLVIDEO1(34,    0,    840000000),
PLLVIDEO1(105,    2,    848000000),
PLLVIDEO1(70,    1,    852000000),
PLLVIDEO1(106,    2,    856000000),
PLLVIDEO1(35,    0,    864000000),
PLLVIDEO1(108,    2,    872000000),
PLLVIDEO1(72,    1,    876000000),
PLLVIDEO1(109,    2,    880000000),
PLLVIDEO1(36,    0,    888000000),
};

/* PLLVE(n,m,freq)    F_N8X7_M0X4 */
struct sunxi_clk_factor_freq factor_pllve_tbl[] = {
PLLVE(3,    0,    96000000),
PLLVE(16,    3,    102000000),
PLLVE(12,    2,    104000000),
PLLVE(8,    1,    108000000),
PLLVE(13,    2,    112000000),
PLLVE(18,    3,    114000000),
PLLVE(4,    0,    120000000),
PLLVE(20,    3,    126000000),
PLLVE(15,    2,    128000000),
PLLVE(10,    1,    132000000),
PLLVE(16,    2,    136000000),
PLLVE(22,    3,    138000000),
PLLVE(5,    0,    144000000),
PLLVE(24,    3,    150000000),
PLLVE(18,    2,    152000000),
PLLVE(12,    1,    156000000),
PLLVE(19,    2,    160000000),
PLLVE(26,    3,    162000000),
PLLVE(6,    0,    168000000),
PLLVE(28,    3,    174000000),
PLLVE(21,    2,    176000000),
PLLVE(14,    1,    180000000),
PLLVE(22,    2,    184000000),
PLLVE(30,    3,    186000000),
PLLVE(7,    0,    192000000),
PLLVE(32,    3,    198000000),
PLLVE(24,    2,    200000000),
PLLVE(16,    1,    204000000),
PLLVE(25,    2,    208000000),
PLLVE(34,    3,    210000000),
PLLVE(8,    0,    216000000),
PLLVE(36,    3,    222000000),
PLLVE(27,    2,    224000000),
PLLVE(18,    1,    228000000),
PLLVE(28,    2,    232000000),
PLLVE(38,    3,    234000000),
PLLVE(9,    0,    240000000),
PLLVE(40,    3,    246000000),
PLLVE(30,    2,    248000000),
PLLVE(20,    1,    252000000),
PLLVE(31,    2,    256000000),
PLLVE(42,    3,    258000000),
PLLVE(10,    0,    264000000),
PLLVE(44,    3,    270000000),
PLLVE(33,    2,    272000000),
PLLVE(22,    1,    276000000),
PLLVE(34,    2,    280000000),
PLLVE(46,    3,    282000000),
PLLVE(11,    0,    288000000),
PLLVE(48,    3,    294000000),
PLLVE(36,    2,    296000000),
PLLVE(24,    1,    300000000),
PLLVE(37,    2,    304000000),
PLLVE(50,    3,    306000000),
PLLVE(12,    0,    312000000),
PLLVE(52,    3,    318000000),
PLLVE(39,    2,    320000000),
PLLVE(26,    1,    324000000),
PLLVE(40,    2,    328000000),
PLLVE(54,    3,    330000000),
PLLVE(13,    0,    336000000),
PLLVE(56,    3,    342000000),
PLLVE(42,    2,    344000000),
PLLVE(28,    1,    348000000),
PLLVE(43,    2,    352000000),
PLLVE(58,    3,    354000000),
PLLVE(14,    0,    360000000),
PLLVE(60,    3,    366000000),
PLLVE(45,    2,    368000000),
PLLVE(30,    1,    372000000),
PLLVE(46,    2,    376000000),
PLLVE(62,    3,    378000000),
PLLVE(15,    0,    384000000),
PLLVE(64,    3,    390000000),
PLLVE(48,    2,    392000000),
PLLVE(32,    1,    396000000),
PLLVE(49,    2,    400000000),
PLLVE(66,    3,    402000000),
PLLVE(16,    0,    408000000),
PLLVE(68,    3,    414000000),
PLLVE(51,    2,    416000000),
PLLVE(34,    1,    420000000),
PLLVE(52,    2,    424000000),
PLLVE(70,    3,    426000000),
PLLVE(17,    0,    432000000),
PLLVE(72,    3,    438000000),
PLLVE(54,    2,    440000000),
PLLVE(36,    1,    444000000),
PLLVE(55,    2,    448000000),
PLLVE(74,    3,    450000000),
PLLVE(18,    0,    456000000),
PLLVE(76,    3,    462000000),
PLLVE(57,    2,    464000000),
PLLVE(38,    1,    468000000),
PLLVE(58,    2,    472000000),
PLLVE(78,    3,    474000000),
PLLVE(19,    0,    480000000),
PLLVE(80,    3,    486000000),
PLLVE(60,    2,    488000000),
PLLVE(40,    1,    492000000),
PLLVE(61,    2,    496000000),
PLLVE(82,    3,    498000000),
PLLVE(20,    0,    504000000),
PLLVE(84,    3,    510000000),
PLLVE(63,    2,    512000000),
PLLVE(42,    1,    516000000),
PLLVE(64,    2,    520000000),
PLLVE(86,    3,    522000000),
PLLVE(21,    0,    528000000),
PLLVE(88,    3,    534000000),
PLLVE(66,    2,    536000000),
PLLVE(44,    1,    540000000),
PLLVE(67,    2,    544000000),
PLLVE(90,    3,    546000000),
PLLVE(22,    0,    552000000),
PLLVE(92,    3,    558000000),
PLLVE(69,    2,    560000000),
PLLVE(46,    1,    564000000),
PLLVE(70,    2,    568000000),
PLLVE(94,    3,    570000000),
PLLVE(23,    0,    576000000),
PLLVE(96,    3,    582000000),
PLLVE(72,    2,    584000000),
PLLVE(48,    1,    588000000),
PLLVE(73,    2,    592000000),
PLLVE(98,    3,    594000000),
PLLVE(24,    0,    600000000),
PLLVE(100,    3,    606000000),
PLLVE(75,    2,    608000000),
PLLVE(50,    1,    612000000),
PLLVE(76,    2,    616000000),
PLLVE(102,    3,    618000000),
PLLVE(25,    0,    624000000),
PLLVE(104,    3,    630000000),
PLLVE(78,    2,    632000000),
PLLVE(52,    1,    636000000),
PLLVE(79,    2,    640000000),
PLLVE(106,    3,    642000000),
PLLVE(26,    0,    648000000),
PLLVE(108,    3,    654000000),
PLLVE(81,    2,    656000000),
PLLVE(54,    1,    660000000),
PLLVE(82,    2,    664000000),
PLLVE(110,    3,    666000000),
PLLVE(27,    0,    672000000),
PLLVE(112,    3,    678000000),
PLLVE(84,    2,    680000000),
PLLVE(56,    1,    684000000),
PLLVE(85,    2,    688000000),
PLLVE(114,    3,    690000000),
PLLVE(28,    0,    696000000),
PLLVE(116,    3,    702000000),
PLLVE(87,    2,    704000000),
PLLVE(58,    1,    708000000),
PLLVE(88,    2,    712000000),
PLLVE(118,    3,    714000000),
PLLVE(29,    0,    720000000),
PLLVE(120,    3,    726000000),
PLLVE(90,    2,    728000000),
PLLVE(60,    1,    732000000),
PLLVE(91,    2,    736000000),
PLLVE(122,    3,    738000000),
PLLVE(30,    0,    744000000),
PLLVE(124,    3,    750000000),
PLLVE(93,    2,    752000000),
PLLVE(62,    1,    756000000),
PLLVE(94,    2,    760000000),
PLLVE(126,    3,    762000000),
PLLVE(31,    0,    768000000),
PLLVE(96,    2,    776000000),
PLLVE(64,    1,    780000000),
PLLVE(97,    2,    784000000),
PLLVE(32,    0,    792000000),
PLLVE(99,    2,    800000000),
PLLVE(66,    1,    804000000),
PLLVE(100,    2,    808000000),
PLLVE(33,    0,    816000000),
PLLVE(102,    2,    824000000),
PLLVE(68,    1,    828000000),
PLLVE(103,    2,    832000000),
PLLVE(34,    0,    840000000),
PLLVE(105,    2,    848000000),
PLLVE(70,    1,    852000000),
PLLVE(106,    2,    856000000),
PLLVE(35,    0,    864000000),
PLLVE(108,    2,    872000000),
PLLVE(72,    1,    876000000),
PLLVE(109,    2,    880000000),
PLLVE(36,    0,    888000000),
};

/* PLLDE(n,m,freq)    F_N8X7_M0X4 */
struct sunxi_clk_factor_freq factor_pllde_tbl[] = {
PLLDE(3,    0,    96000000),
PLLDE(16,    3,    102000000),
PLLDE(12,    2,    104000000),
PLLDE(8,    1,    108000000),
PLLDE(13,    2,    112000000),
PLLDE(18,    3,    114000000),
PLLDE(4,    0,    120000000),
PLLDE(20,    3,    126000000),
PLLDE(15,    2,    128000000),
PLLDE(10,    1,    132000000),
PLLDE(16,    2,    136000000),
PLLDE(22,    3,    138000000),
PLLDE(5,    0,    144000000),
PLLDE(24,    3,    150000000),
PLLDE(18,    2,    152000000),
PLLDE(12,    1,    156000000),
PLLDE(19,    2,    160000000),
PLLDE(26,    3,    162000000),
PLLDE(6,    0,    168000000),
PLLDE(28,    3,    174000000),
PLLDE(21,    2,    176000000),
PLLDE(14,    1,    180000000),
PLLDE(22,    2,    184000000),
PLLDE(30,    3,    186000000),
PLLDE(7,    0,    192000000),
PLLDE(32,    3,    198000000),
PLLDE(24,    2,    200000000),
PLLDE(16,    1,    204000000),
PLLDE(25,    2,    208000000),
PLLDE(34,    3,    210000000),
PLLDE(8,    0,    216000000),
PLLDE(36,    3,    222000000),
PLLDE(27,    2,    224000000),
PLLDE(18,    1,    228000000),
PLLDE(28,    2,    232000000),
PLLDE(38,    3,    234000000),
PLLDE(9,    0,    240000000),
PLLDE(40,    3,    246000000),
PLLDE(30,    2,    248000000),
PLLDE(20,    1,    252000000),
PLLDE(31,    2,    256000000),
PLLDE(42,    3,    258000000),
PLLDE(10,    0,    264000000),
PLLDE(44,    3,    270000000),
PLLDE(33,    2,    272000000),
PLLDE(22,    1,    276000000),
PLLDE(34,    2,    280000000),
PLLDE(46,    3,    282000000),
PLLDE(11,    0,    288000000),
PLLDE(48,    3,    294000000),
PLLDE(36,    2,    296000000),
PLLDE(24,    1,    300000000),
PLLDE(37,    2,    304000000),
PLLDE(50,    3,    306000000),
PLLDE(12,    0,    312000000),
PLLDE(52,    3,    318000000),
PLLDE(39,    2,    320000000),
PLLDE(26,    1,    324000000),
PLLDE(40,    2,    328000000),
PLLDE(54,    3,    330000000),
PLLDE(13,    0,    336000000),
PLLDE(56,    3,    342000000),
PLLDE(42,    2,    344000000),
PLLDE(28,    1,    348000000),
PLLDE(43,    2,    352000000),
PLLDE(58,    3,    354000000),
PLLDE(14,    0,    360000000),
PLLDE(60,    3,    366000000),
PLLDE(45,    2,    368000000),
PLLDE(30,    1,    372000000),
PLLDE(46,    2,    376000000),
PLLDE(62,    3,    378000000),
PLLDE(15,    0,    384000000),
PLLDE(64,    3,    390000000),
PLLDE(48,    2,    392000000),
PLLDE(32,    1,    396000000),
PLLDE(49,    2,    400000000),
PLLDE(66,    3,    402000000),
PLLDE(16,    0,    408000000),
PLLDE(68,    3,    414000000),
PLLDE(51,    2,    416000000),
PLLDE(34,    1,    420000000),
PLLDE(52,    2,    424000000),
PLLDE(70,    3,    426000000),
PLLDE(17,    0,    432000000),
PLLDE(72,    3,    438000000),
PLLDE(54,    2,    440000000),
PLLDE(36,    1,    444000000),
PLLDE(55,    2,    448000000),
PLLDE(74,    3,    450000000),
PLLDE(18,    0,    456000000),
PLLDE(76,    3,    462000000),
PLLDE(57,    2,    464000000),
PLLDE(38,    1,    468000000),
PLLDE(58,    2,    472000000),
PLLDE(78,    3,    474000000),
PLLDE(19,    0,    480000000),
PLLDE(80,    3,    486000000),
PLLDE(60,    2,    488000000),
PLLDE(40,    1,    492000000),
PLLDE(61,    2,    496000000),
PLLDE(82,    3,    498000000),
PLLDE(20,    0,    504000000),
PLLDE(84,    3,    510000000),
PLLDE(63,    2,    512000000),
PLLDE(42,    1,    516000000),
PLLDE(64,    2,    520000000),
PLLDE(86,    3,    522000000),
PLLDE(21,    0,    528000000),
PLLDE(88,    3,    534000000),
PLLDE(66,    2,    536000000),
PLLDE(44,    1,    540000000),
PLLDE(67,    2,    544000000),
PLLDE(90,    3,    546000000),
PLLDE(22,    0,    552000000),
PLLDE(92,    3,    558000000),
PLLDE(69,    2,    560000000),
PLLDE(46,    1,    564000000),
PLLDE(70,    2,    568000000),
PLLDE(94,    3,    570000000),
PLLDE(23,    0,    576000000),
PLLDE(96,    3,    582000000),
PLLDE(72,    2,    584000000),
PLLDE(48,    1,    588000000),
PLLDE(73,    2,    592000000),
PLLDE(98,    3,    594000000),
PLLDE(24,    0,    600000000),
PLLDE(100,    3,    606000000),
PLLDE(75,    2,    608000000),
PLLDE(50,    1,    612000000),
PLLDE(76,    2,    616000000),
PLLDE(102,    3,    618000000),
PLLDE(25,    0,    624000000),
PLLDE(104,    3,    630000000),
PLLDE(78,    2,    632000000),
PLLDE(52,    1,    636000000),
PLLDE(79,    2,    640000000),
PLLDE(106,    3,    642000000),
PLLDE(26,    0,    648000000),
PLLDE(108,    3,    654000000),
PLLDE(81,    2,    656000000),
PLLDE(54,    1,    660000000),
PLLDE(82,    2,    664000000),
PLLDE(110,    3,    666000000),
PLLDE(27,    0,    672000000),
PLLDE(112,    3,    678000000),
PLLDE(84,    2,    680000000),
PLLDE(56,    1,    684000000),
PLLDE(85,    2,    688000000),
PLLDE(114,    3,    690000000),
PLLDE(28,    0,    696000000),
PLLDE(116,    3,    702000000),
PLLDE(87,    2,    704000000),
PLLDE(58,    1,    708000000),
PLLDE(88,    2,    712000000),
PLLDE(118,    3,    714000000),
PLLDE(29,    0,    720000000),
PLLDE(120,    3,    726000000),
PLLDE(90,    2,    728000000),
PLLDE(60,    1,    732000000),
PLLDE(91,    2,    736000000),
PLLDE(122,    3,    738000000),
PLLDE(30,    0,    744000000),
PLLDE(124,    3,    750000000),
PLLDE(93,    2,    752000000),
PLLDE(62,    1,    756000000),
PLLDE(94,    2,    760000000),
PLLDE(126,    3,    762000000),
PLLDE(31,    0,    768000000),
PLLDE(96,    2,    776000000),
PLLDE(64,    1,    780000000),
PLLDE(97,    2,    784000000),
PLLDE(32,    0,    792000000),
PLLDE(99,    2,    800000000),
PLLDE(66,    1,    804000000),
PLLDE(100,    2,    808000000),
PLLDE(33,    0,    816000000),
PLLDE(102,    2,    824000000),
PLLDE(68,    1,    828000000),
PLLDE(103,    2,    832000000),
PLLDE(34,    0,    840000000),
PLLDE(105,    2,    848000000),
PLLDE(70,    1,    852000000),
PLLDE(106,    2,    856000000),
PLLDE(35,    0,    864000000),
PLLDE(108,    2,    872000000),
PLLDE(72,    1,    876000000),
PLLDE(109,    2,    880000000),
PLLDE(36,    0,    888000000),
};

/* PLLISP(n,m,freq)    F_N8X7_M0X4 */
struct sunxi_clk_factor_freq factor_pllisp_tbl[] = {
PLLISP(3,    0,    96000000),
PLLISP(16,    3,    102000000),
PLLISP(12,    2,    104000000),
PLLISP(8,    1,    108000000),
PLLISP(13,    2,    112000000),
PLLISP(18,    3,    114000000),
PLLISP(4,    0,    120000000),
PLLISP(20,    3,    126000000),
PLLISP(15,    2,    128000000),
PLLISP(10,    1,    132000000),
PLLISP(16,    2,    136000000),
PLLISP(22,    3,    138000000),
PLLISP(5,    0,    144000000),
PLLISP(24,    3,    150000000),
PLLISP(18,    2,    152000000),
PLLISP(12,    1,    156000000),
PLLISP(19,    2,    160000000),
PLLISP(26,    3,    162000000),
PLLISP(6,    0,    168000000),
PLLISP(28,    3,    174000000),
PLLISP(21,    2,    176000000),
PLLISP(14,    1,    180000000),
PLLISP(22,    2,    184000000),
PLLISP(30,    3,    186000000),
PLLISP(7,    0,    192000000),
PLLISP(32,    3,    198000000),
PLLISP(24,    2,    200000000),
PLLISP(16,    1,    204000000),
PLLISP(25,    2,    208000000),
PLLISP(34,    3,    210000000),
PLLISP(8,    0,    216000000),
PLLISP(36,    3,    222000000),
PLLISP(27,    2,    224000000),
PLLISP(18,    1,    228000000),
PLLISP(28,    2,    232000000),
PLLISP(38,    3,    234000000),
PLLISP(9,    0,    240000000),
PLLISP(40,    3,    246000000),
PLLISP(30,    2,    248000000),
PLLISP(20,    1,    252000000),
PLLISP(31,    2,    256000000),
PLLISP(42,    3,    258000000),
PLLISP(10,    0,    264000000),
PLLISP(44,    3,    270000000),
PLLISP(33,    2,    272000000),
PLLISP(22,    1,    276000000),
PLLISP(34,    2,    280000000),
PLLISP(46,    3,    282000000),
PLLISP(11,    0,    288000000),
PLLISP(48,    3,    294000000),
PLLISP(36,    2,    296000000),
PLLISP(24,    1,    300000000),
PLLISP(37,    2,    304000000),
PLLISP(50,    3,    306000000),
PLLISP(12,    0,    312000000),
PLLISP(52,    3,    318000000),
PLLISP(39,    2,    320000000),
PLLISP(26,    1,    324000000),
PLLISP(40,    2,    328000000),
PLLISP(54,    3,    330000000),
PLLISP(13,    0,    336000000),
PLLISP(56,    3,    342000000),
PLLISP(42,    2,    344000000),
PLLISP(28,    1,    348000000),
PLLISP(43,    2,    352000000),
PLLISP(58,    3,    354000000),
PLLISP(14,    0,    360000000),
PLLISP(60,    3,    366000000),
PLLISP(45,    2,    368000000),
PLLISP(30,    1,    372000000),
PLLISP(46,    2,    376000000),
PLLISP(62,    3,    378000000),
PLLISP(15,    0,    384000000),
PLLISP(64,    3,    390000000),
PLLISP(48,    2,    392000000),
PLLISP(32,    1,    396000000),
PLLISP(49,    2,    400000000),
PLLISP(66,    3,    402000000),
PLLISP(16,    0,    408000000),
PLLISP(68,    3,    414000000),
PLLISP(51,    2,    416000000),
PLLISP(34,    1,    420000000),
PLLISP(52,    2,    424000000),
PLLISP(70,    3,    426000000),
PLLISP(17,    0,    432000000),
PLLISP(72,    3,    438000000),
PLLISP(54,    2,    440000000),
PLLISP(36,    1,    444000000),
PLLISP(55,    2,    448000000),
PLLISP(74,    3,    450000000),
PLLISP(18,    0,    456000000),
PLLISP(76,    3,    462000000),
PLLISP(57,    2,    464000000),
PLLISP(38,    1,    468000000),
PLLISP(58,    2,    472000000),
PLLISP(78,    3,    474000000),
PLLISP(19,    0,    480000000),
PLLISP(80,    3,    486000000),
PLLISP(60,    2,    488000000),
PLLISP(40,    1,    492000000),
PLLISP(61,    2,    496000000),
PLLISP(82,    3,    498000000),
PLLISP(20,    0,    504000000),
PLLISP(84,    3,    510000000),
PLLISP(63,    2,    512000000),
PLLISP(42,    1,    516000000),
PLLISP(64,    2,    520000000),
PLLISP(86,    3,    522000000),
PLLISP(21,    0,    528000000),
PLLISP(88,    3,    534000000),
PLLISP(66,    2,    536000000),
PLLISP(44,    1,    540000000),
PLLISP(67,    2,    544000000),
PLLISP(90,    3,    546000000),
PLLISP(22,    0,    552000000),
PLLISP(92,    3,    558000000),
PLLISP(69,    2,    560000000),
PLLISP(46,    1,    564000000),
PLLISP(70,    2,    568000000),
PLLISP(94,    3,    570000000),
PLLISP(23,    0,    576000000),
PLLISP(96,    3,    582000000),
PLLISP(72,    2,    584000000),
PLLISP(48,    1,    588000000),
PLLISP(73,    2,    592000000),
PLLISP(98,    3,    594000000),
PLLISP(24,    0,    600000000),
PLLISP(100,    3,    606000000),
PLLISP(75,    2,    608000000),
PLLISP(50,    1,    612000000),
PLLISP(76,    2,    616000000),
PLLISP(102,    3,    618000000),
PLLISP(25,    0,    624000000),
PLLISP(104,    3,    630000000),
PLLISP(78,    2,    632000000),
PLLISP(52,    1,    636000000),
PLLISP(79,    2,    640000000),
PLLISP(106,    3,    642000000),
PLLISP(26,    0,    648000000),
PLLISP(108,    3,    654000000),
PLLISP(81,    2,    656000000),
PLLISP(54,    1,    660000000),
PLLISP(82,    2,    664000000),
PLLISP(110,    3,    666000000),
PLLISP(27,    0,    672000000),
PLLISP(112,    3,    678000000),
PLLISP(84,    2,    680000000),
PLLISP(56,    1,    684000000),
PLLISP(85,    2,    688000000),
PLLISP(114,    3,    690000000),
PLLISP(28,    0,    696000000),
PLLISP(116,    3,    702000000),
PLLISP(87,    2,    704000000),
PLLISP(58,    1,    708000000),
PLLISP(88,    2,    712000000),
PLLISP(118,    3,    714000000),
PLLISP(29,    0,    720000000),
PLLISP(120,    3,    726000000),
PLLISP(90,    2,    728000000),
PLLISP(60,    1,    732000000),
PLLISP(91,    2,    736000000),
PLLISP(122,    3,    738000000),
PLLISP(30,    0,    744000000),
PLLISP(124,    3,    750000000),
PLLISP(93,    2,    752000000),
PLLISP(62,    1,    756000000),
PLLISP(94,    2,    760000000),
PLLISP(126,    3,    762000000),
PLLISP(31,    0,    768000000),
PLLISP(96,    2,    776000000),
PLLISP(64,    1,    780000000),
PLLISP(97,    2,    784000000),
PLLISP(32,    0,    792000000),
PLLISP(99,    2,    800000000),
PLLISP(66,    1,    804000000),
PLLISP(100,    2,    808000000),
PLLISP(33,    0,    816000000),
PLLISP(102,    2,    824000000),
PLLISP(68,    1,    828000000),
PLLISP(103,    2,    832000000),
PLLISP(34,    0,    840000000),
PLLISP(105,    2,    848000000),
PLLISP(70,    1,    852000000),
PLLISP(106,    2,    856000000),
PLLISP(35,    0,    864000000),
PLLISP(108,    2,    872000000),
PLLISP(72,    1,    876000000),
PLLISP(109,    2,    880000000),
PLLISP(36,    0,    888000000),
};

/* PLLHSIC(n,m,freq)    F_N8X7_M0X4 */
struct sunxi_clk_factor_freq factor_pllhsic_tbl[] = {
PLLHSIC(3,    0,    96000000),
PLLHSIC(16,    3,    102000000),
PLLHSIC(12,    2,    104000000),
PLLHSIC(8,    1,    108000000),
PLLHSIC(13,    2,    112000000),
PLLHSIC(18,    3,    114000000),
PLLHSIC(4,    0,    120000000),
PLLHSIC(20,    3,    126000000),
PLLHSIC(15,    2,    128000000),
PLLHSIC(10,    1,    132000000),
PLLHSIC(16,    2,    136000000),
PLLHSIC(22,    3,    138000000),
PLLHSIC(5,    0,    144000000),
PLLHSIC(24,    3,    150000000),
PLLHSIC(18,    2,    152000000),
PLLHSIC(12,    1,    156000000),
PLLHSIC(19,    2,    160000000),
PLLHSIC(26,    3,    162000000),
PLLHSIC(6,    0,    168000000),
PLLHSIC(28,    3,    174000000),
PLLHSIC(21,    2,    176000000),
PLLHSIC(14,    1,    180000000),
PLLHSIC(22,    2,    184000000),
PLLHSIC(30,    3,    186000000),
PLLHSIC(7,    0,    192000000),
PLLHSIC(32,    3,    198000000),
PLLHSIC(24,    2,    200000000),
PLLHSIC(16,    1,    204000000),
PLLHSIC(25,    2,    208000000),
PLLHSIC(34,    3,    210000000),
PLLHSIC(8,    0,    216000000),
PLLHSIC(36,    3,    222000000),
PLLHSIC(27,    2,    224000000),
PLLHSIC(18,    1,    228000000),
PLLHSIC(28,    2,    232000000),
PLLHSIC(38,    3,    234000000),
PLLHSIC(9,    0,    240000000),
PLLHSIC(40,    3,    246000000),
PLLHSIC(30,    2,    248000000),
PLLHSIC(20,    1,    252000000),
PLLHSIC(31,    2,    256000000),
PLLHSIC(42,    3,    258000000),
PLLHSIC(10,    0,    264000000),
PLLHSIC(44,    3,    270000000),
PLLHSIC(33,    2,    272000000),
PLLHSIC(22,    1,    276000000),
PLLHSIC(34,    2,    280000000),
PLLHSIC(46,    3,    282000000),
PLLHSIC(11,    0,    288000000),
PLLHSIC(48,    3,    294000000),
PLLHSIC(36,    2,    296000000),
PLLHSIC(24,    1,    300000000),
PLLHSIC(37,    2,    304000000),
PLLHSIC(50,    3,    306000000),
PLLHSIC(12,    0,    312000000),
PLLHSIC(52,    3,    318000000),
PLLHSIC(39,    2,    320000000),
PLLHSIC(26,    1,    324000000),
PLLHSIC(40,    2,    328000000),
PLLHSIC(54,    3,    330000000),
PLLHSIC(13,    0,    336000000),
PLLHSIC(56,    3,    342000000),
PLLHSIC(42,    2,    344000000),
PLLHSIC(28,    1,    348000000),
PLLHSIC(43,    2,    352000000),
PLLHSIC(58,    3,    354000000),
PLLHSIC(14,    0,    360000000),
PLLHSIC(60,    3,    366000000),
PLLHSIC(45,    2,    368000000),
PLLHSIC(30,    1,    372000000),
PLLHSIC(46,    2,    376000000),
PLLHSIC(62,    3,    378000000),
PLLHSIC(15,    0,    384000000),
PLLHSIC(64,    3,    390000000),
PLLHSIC(48,    2,    392000000),
PLLHSIC(32,    1,    396000000),
PLLHSIC(49,    2,    400000000),
PLLHSIC(66,    3,    402000000),
PLLHSIC(16,    0,    408000000),
PLLHSIC(68,    3,    414000000),
PLLHSIC(51,    2,    416000000),
PLLHSIC(34,    1,    420000000),
PLLHSIC(52,    2,    424000000),
PLLHSIC(70,    3,    426000000),
PLLHSIC(17,    0,    432000000),
PLLHSIC(72,    3,    438000000),
PLLHSIC(54,    2,    440000000),
PLLHSIC(36,    1,    444000000),
PLLHSIC(55,    2,    448000000),
PLLHSIC(74,    3,    450000000),
PLLHSIC(18,    0,    456000000),
PLLHSIC(76,    3,    462000000),
PLLHSIC(57,    2,    464000000),
PLLHSIC(38,    1,    468000000),
PLLHSIC(58,    2,    472000000),
PLLHSIC(78,    3,    474000000),
PLLHSIC(19,    0,    480000000),
PLLHSIC(80,    3,    486000000),
PLLHSIC(60,    2,    488000000),
PLLHSIC(40,    1,    492000000),
PLLHSIC(61,    2,    496000000),
PLLHSIC(82,    3,    498000000),
PLLHSIC(20,    0,    504000000),
PLLHSIC(84,    3,    510000000),
PLLHSIC(63,    2,    512000000),
PLLHSIC(42,    1,    516000000),
PLLHSIC(64,    2,    520000000),
PLLHSIC(86,    3,    522000000),
PLLHSIC(21,    0,    528000000),
PLLHSIC(88,    3,    534000000),
PLLHSIC(66,    2,    536000000),
PLLHSIC(44,    1,    540000000),
PLLHSIC(67,    2,    544000000),
PLLHSIC(90,    3,    546000000),
PLLHSIC(22,    0,    552000000),
PLLHSIC(92,    3,    558000000),
PLLHSIC(69,    2,    560000000),
PLLHSIC(46,    1,    564000000),
PLLHSIC(70,    2,    568000000),
PLLHSIC(94,    3,    570000000),
PLLHSIC(23,    0,    576000000),
PLLHSIC(96,    3,    582000000),
PLLHSIC(72,    2,    584000000),
PLLHSIC(48,    1,    588000000),
PLLHSIC(73,    2,    592000000),
PLLHSIC(98,    3,    594000000),
PLLHSIC(24,    0,    600000000),
PLLHSIC(100,    3,    606000000),
PLLHSIC(75,    2,    608000000),
PLLHSIC(50,    1,    612000000),
PLLHSIC(76,    2,    616000000),
PLLHSIC(102,    3,    618000000),
PLLHSIC(25,    0,    624000000),
PLLHSIC(104,    3,    630000000),
PLLHSIC(78,    2,    632000000),
PLLHSIC(52,    1,    636000000),
PLLHSIC(79,    2,    640000000),
PLLHSIC(106,    3,    642000000),
PLLHSIC(26,    0,    648000000),
PLLHSIC(108,    3,    654000000),
PLLHSIC(81,    2,    656000000),
PLLHSIC(54,    1,    660000000),
PLLHSIC(82,    2,    664000000),
PLLHSIC(110,    3,    666000000),
PLLHSIC(27,    0,    672000000),
PLLHSIC(112,    3,    678000000),
PLLHSIC(84,    2,    680000000),
PLLHSIC(56,    1,    684000000),
PLLHSIC(85,    2,    688000000),
PLLHSIC(114,    3,    690000000),
PLLHSIC(28,    0,    696000000),
PLLHSIC(116,    3,    702000000),
PLLHSIC(87,    2,    704000000),
PLLHSIC(58,    1,    708000000),
PLLHSIC(88,    2,    712000000),
PLLHSIC(118,    3,    714000000),
PLLHSIC(29,    0,    720000000),
PLLHSIC(120,    3,    726000000),
PLLHSIC(90,    2,    728000000),
PLLHSIC(60,    1,    732000000),
PLLHSIC(91,    2,    736000000),
PLLHSIC(122,    3,    738000000),
PLLHSIC(30,    0,    744000000),
PLLHSIC(124,    3,    750000000),
PLLHSIC(93,    2,    752000000),
PLLHSIC(62,    1,    756000000),
PLLHSIC(94,    2,    760000000),
PLLHSIC(126,    3,    762000000),
PLLHSIC(31,    0,    768000000),
PLLHSIC(96,    2,    776000000),
PLLHSIC(64,    1,    780000000),
PLLHSIC(97,    2,    784000000),
PLLHSIC(32,    0,    792000000),
PLLHSIC(99,    2,    800000000),
PLLHSIC(66,    1,    804000000),
PLLHSIC(100,    2,    808000000),
PLLHSIC(33,    0,    816000000),
PLLHSIC(102,    2,    824000000),
PLLHSIC(68,    1,    828000000),
PLLHSIC(103,    2,    832000000),
PLLHSIC(34,    0,    840000000),
PLLHSIC(105,    2,    848000000),
PLLHSIC(70,    1,    852000000),
PLLHSIC(106,    2,    856000000),
PLLHSIC(35,    0,    864000000),
PLLHSIC(108,    2,    872000000),
PLLHSIC(72,    1,    876000000),
PLLHSIC(109,    2,    880000000),
PLLHSIC(36,    0,    888000000),
};

/* PLLEVE(n,m,freq)    F_N8X7_M0X4 */
struct sunxi_clk_factor_freq factor_plleve_tbl[] = {
PLLEVE(3,    0,    96000000),
PLLEVE(16,    3,    102000000),
PLLEVE(12,    2,    104000000),
PLLEVE(8,    1,    108000000),
PLLEVE(13,    2,    112000000),
PLLEVE(18,    3,    114000000),
PLLEVE(4,    0,    120000000),
PLLEVE(20,    3,    126000000),
PLLEVE(15,    2,    128000000),
PLLEVE(10,    1,    132000000),
PLLEVE(16,    2,    136000000),
PLLEVE(22,    3,    138000000),
PLLEVE(5,    0,    144000000),
PLLEVE(24,    3,    150000000),
PLLEVE(18,    2,    152000000),
PLLEVE(12,    1,    156000000),
PLLEVE(19,    2,    160000000),
PLLEVE(26,    3,    162000000),
PLLEVE(6,    0,    168000000),
PLLEVE(28,    3,    174000000),
PLLEVE(21,    2,    176000000),
PLLEVE(14,    1,    180000000),
PLLEVE(22,    2,    184000000),
PLLEVE(30,    3,    186000000),
PLLEVE(7,    0,    192000000),
PLLEVE(32,    3,    198000000),
PLLEVE(24,    2,    200000000),
PLLEVE(16,    1,    204000000),
PLLEVE(25,    2,    208000000),
PLLEVE(34,    3,    210000000),
PLLEVE(8,    0,    216000000),
PLLEVE(36,    3,    222000000),
PLLEVE(27,    2,    224000000),
PLLEVE(18,    1,    228000000),
PLLEVE(28,    2,    232000000),
PLLEVE(38,    3,    234000000),
PLLEVE(9,    0,    240000000),
PLLEVE(40,    3,    246000000),
PLLEVE(30,    2,    248000000),
PLLEVE(20,    1,    252000000),
PLLEVE(31,    2,    256000000),
PLLEVE(42,    3,    258000000),
PLLEVE(10,    0,    264000000),
PLLEVE(44,    3,    270000000),
PLLEVE(33,    2,    272000000),
PLLEVE(22,    1,    276000000),
PLLEVE(34,    2,    280000000),
PLLEVE(46,    3,    282000000),
PLLEVE(11,    0,    288000000),
PLLEVE(48,    3,    294000000),
PLLEVE(36,    2,    296000000),
PLLEVE(24,    1,    300000000),
PLLEVE(37,    2,    304000000),
PLLEVE(50,    3,    306000000),
PLLEVE(12,    0,    312000000),
PLLEVE(52,    3,    318000000),
PLLEVE(39,    2,    320000000),
PLLEVE(26,    1,    324000000),
PLLEVE(40,    2,    328000000),
PLLEVE(54,    3,    330000000),
PLLEVE(13,    0,    336000000),
PLLEVE(56,    3,    342000000),
PLLEVE(42,    2,    344000000),
PLLEVE(28,    1,    348000000),
PLLEVE(43,    2,    352000000),
PLLEVE(58,    3,    354000000),
PLLEVE(14,    0,    360000000),
PLLEVE(60,    3,    366000000),
PLLEVE(45,    2,    368000000),
PLLEVE(30,    1,    372000000),
PLLEVE(46,    2,    376000000),
PLLEVE(62,    3,    378000000),
PLLEVE(15,    0,    384000000),
PLLEVE(64,    3,    390000000),
PLLEVE(48,    2,    392000000),
PLLEVE(32,    1,    396000000),
PLLEVE(49,    2,    400000000),
PLLEVE(66,    3,    402000000),
PLLEVE(16,    0,    408000000),
PLLEVE(68,    3,    414000000),
PLLEVE(51,    2,    416000000),
PLLEVE(34,    1,    420000000),
PLLEVE(52,    2,    424000000),
PLLEVE(70,    3,    426000000),
PLLEVE(17,    0,    432000000),
PLLEVE(72,    3,    438000000),
PLLEVE(54,    2,    440000000),
PLLEVE(36,    1,    444000000),
PLLEVE(55,    2,    448000000),
PLLEVE(74,    3,    450000000),
PLLEVE(18,    0,    456000000),
PLLEVE(76,    3,    462000000),
PLLEVE(57,    2,    464000000),
PLLEVE(38,    1,    468000000),
PLLEVE(58,    2,    472000000),
PLLEVE(78,    3,    474000000),
PLLEVE(19,    0,    480000000),
PLLEVE(80,    3,    486000000),
PLLEVE(60,    2,    488000000),
PLLEVE(40,    1,    492000000),
PLLEVE(61,    2,    496000000),
PLLEVE(82,    3,    498000000),
PLLEVE(20,    0,    504000000),
PLLEVE(84,    3,    510000000),
PLLEVE(63,    2,    512000000),
PLLEVE(42,    1,    516000000),
PLLEVE(64,    2,    520000000),
PLLEVE(86,    3,    522000000),
PLLEVE(21,    0,    528000000),
PLLEVE(88,    3,    534000000),
PLLEVE(66,    2,    536000000),
PLLEVE(44,    1,    540000000),
PLLEVE(67,    2,    544000000),
PLLEVE(90,    3,    546000000),
PLLEVE(22,    0,    552000000),
PLLEVE(92,    3,    558000000),
PLLEVE(69,    2,    560000000),
PLLEVE(46,    1,    564000000),
PLLEVE(70,    2,    568000000),
PLLEVE(94,    3,    570000000),
PLLEVE(23,    0,    576000000),
PLLEVE(96,    3,    582000000),
PLLEVE(72,    2,    584000000),
PLLEVE(48,    1,    588000000),
PLLEVE(73,    2,    592000000),
PLLEVE(98,    3,    594000000),
PLLEVE(24,    0,    600000000),
PLLEVE(100,    3,    606000000),
PLLEVE(75,    2,    608000000),
PLLEVE(50,    1,    612000000),
PLLEVE(76,    2,    616000000),
PLLEVE(102,    3,    618000000),
PLLEVE(25,    0,    624000000),
PLLEVE(104,    3,    630000000),
PLLEVE(78,    2,    632000000),
PLLEVE(52,    1,    636000000),
PLLEVE(79,    2,    640000000),
PLLEVE(106,    3,    642000000),
PLLEVE(26,    0,    648000000),
PLLEVE(108,    3,    654000000),
PLLEVE(81,    2,    656000000),
PLLEVE(54,    1,    660000000),
PLLEVE(82,    2,    664000000),
PLLEVE(110,    3,    666000000),
PLLEVE(27,    0,    672000000),
PLLEVE(112,    3,    678000000),
PLLEVE(84,    2,    680000000),
PLLEVE(56,    1,    684000000),
PLLEVE(85,    2,    688000000),
PLLEVE(114,    3,    690000000),
PLLEVE(28,    0,    696000000),
PLLEVE(116,    3,    702000000),
PLLEVE(87,    2,    704000000),
PLLEVE(58,    1,    708000000),
PLLEVE(88,    2,    712000000),
PLLEVE(118,    3,    714000000),
PLLEVE(29,    0,    720000000),
PLLEVE(120,    3,    726000000),
PLLEVE(90,    2,    728000000),
PLLEVE(60,    1,    732000000),
PLLEVE(91,    2,    736000000),
PLLEVE(122,    3,    738000000),
PLLEVE(30,    0,    744000000),
PLLEVE(124,    3,    750000000),
PLLEVE(93,    2,    752000000),
PLLEVE(62,    1,    756000000),
PLLEVE(94,    2,    760000000),
PLLEVE(126,    3,    762000000),
PLLEVE(31,    0,    768000000),
PLLEVE(96,    2,    776000000),
PLLEVE(64,    1,    780000000),
PLLEVE(97,    2,    784000000),
PLLEVE(32,    0,    792000000),
PLLEVE(99,    2,    800000000),
PLLEVE(66,    1,    804000000),
PLLEVE(100,    2,    808000000),
PLLEVE(33,    0,    816000000),
PLLEVE(102,    2,    824000000),
PLLEVE(68,    1,    828000000),
PLLEVE(103,    2,    832000000),
PLLEVE(34,    0,    840000000),
PLLEVE(105,    2,    848000000),
PLLEVE(70,    1,    852000000),
PLLEVE(106,    2,    856000000),
PLLEVE(35,    0,    864000000),
PLLEVE(108,    2,    872000000),
PLLEVE(72,    1,    876000000),
PLLEVE(109,    2,    880000000),
PLLEVE(36,    0,    888000000),
};

/* PLLAUDIO(n,m,p,freq)    F_N8X5_M0X5_P16x4 */
struct sunxi_clk_factor_freq factor_pllaudio_tbl[] = {
PLLAUDIO(85 ,    20 ,    3  ,    24571000U),
};

static unsigned int pllcpu0_max, pllcpu1_max, pllddr0_max, pllddr1_max,
		    pllperiph0_max, pllperiph1_max, pllgpu_max, pllvideo0_max,
		    pllvideo1_max, pllve_max, pllde_max, pllisp_max,
		    pllhsic_max, pllaudio_max, plleve_max;

#define PLL_MAX_ASSIGN(name) (pll##name##_max = \
	factor_pll##name##_tbl[ARRAY_SIZE(factor_pll##name##_tbl)-1].freq)

void sunxi_clk_factor_initlimits(void)
{
	PLL_MAX_ASSIGN(cpu0);
	PLL_MAX_ASSIGN(cpu1);
	PLL_MAX_ASSIGN(ddr0);
	PLL_MAX_ASSIGN(ddr1);
	PLL_MAX_ASSIGN(periph0);
	PLL_MAX_ASSIGN(periph1);
	PLL_MAX_ASSIGN(gpu);
	PLL_MAX_ASSIGN(video0);
	PLL_MAX_ASSIGN(video1);
	PLL_MAX_ASSIGN(ve);
	PLL_MAX_ASSIGN(de);
	PLL_MAX_ASSIGN(isp);
	PLL_MAX_ASSIGN(hsic);
	PLL_MAX_ASSIGN(audio);
	PLL_MAX_ASSIGN(eve);
}
